How to save a custom colormap and use it again in Matlab?

Viewed 6238

I have created a colormap that resembles the human connectome project colormap ROY-BIG-BL, doing it manually on the colormap editor see here.

However, I am not able to save this as a colormap. I tried different commands such as

mycmap = get(gcf,'colormap')

I read that with Matlab 2015 one should use gca, but this gives an error.

Error using matlab.graphics.axis.Axes/get There is no colormap property on the Axes class.

When I then try to use the saved mycmap for another figure, it ignores all modifications und uses the basic colormap parula.

Thanks for help. How can I save it and use it as another colormap in any figure I want?

1 Answers
Related