-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colorbar key for antsrSurf #376
Comments
yes -- the "plot a color bar" then add numbers on your own approach is good. |
Yeah, agreed. Whenever I need to make custom color bars, I create my own using |
pretty sure |
I see from calling convertScalarImageToRGB that it requires an input image. What's an easy way to create a 2D image that has, say, 10 pixels in the x dimension and 100 in the y dimension, with the y values going from 1 to 100? If I understand correctly, convertScalarImageToRGB would translate that into an appropriate colorbar matching the colormap I use? |
One easy solution off the top of my head:
|
Thank you for the hint! For future reference to anyone else needing the same thing, here is what I got to work:
NOTE: The ordering of numbers "100:1" in the rbind command above puts the highest values at the top of the image, and lowest values at the bottom, which is typically what you want for colorbar legends
This creates a jpg of a bar with the range of colors matching, in this case, the "jet" colormap. Reading this into whatever you use to create figures (e.g., powerpoint) allows you to add text indicating values for different parts of the range. |
I can make lovely 3D surface renderings with functional overlay using antsrSurf. I'd like to use these for a publication. Is there a way to include (or create in some other way) a key legend for the rendering that shows approximately what colors correspond to which values? If this function isn't available from antsrSurf, is there a way (perhaps using a different function) to just plot a bar without numbers that illustrates the color range matching what I used for my rendering (e.g., the "jet" color scheme), which I could then easily enough add numbers indicating the range using powerpoint or some other software?
Thanks for any thoughts or suggestions about this!
-Tom
The text was updated successfully, but these errors were encountered: