Closed Stknx closed 3 months ago
I cannot reproduce - it runs ok on my system when I run your code in the Matlab console. Perhaps you try to run it in a Live Editor script? without additional information about your run-time environment I cannot assist
You can also try to add a call to drawnow
before you call export_fig, to ensure that the colormap is updated prior to export.
Thanks for this - it was because I was in Live Editor scripts (for both example and original problem). Ran as standalone script and all fine. Much appreciated.
I'm trying to export some surface plots I'm making with a custom colormap but noticed that the surfaces were being plotted with the default colormap rather than the specified colormap. Ran a few checks and this even extends to the basic swapping of colormaps to another of the defaults. E.g the following
gives colortest.png
rather than colortest_desired.png (desired made by a copy and paste job)
![colortest_desired](https://github.com/altmany/export_fig/assets/116559755/0be3386d-6428-4cf2-9996-d19b66a97542)
Any thoughts? I tried playing with the renderer and no immediate luck there.