CHLNDDEV / OceanMesh2D

A two-dimensional triangular mesh generator with pre- and post-processing utilities written in pure MATLAB (no toolboxes required) designed specifically to build models that solve shallow-water equations or wave equations in a coastal environment (ADCIRC, FVCOM, WaveWatch3, SWAN, SCHISM, Telemac, etc.).
https://github.com/sponsors/krober10nd
GNU General Public License v3.0
183 stars 65 forks source link

pivot not respected when plotting with custom clabel ticks #212

Closed krober10nd closed 2 years ago

krober10nd commented 3 years ago

When plotting with the colormap kwarg option using msh.plot, when the ticks field of the cb colorbar are replaced inside msh.plotter, the colormap reverts to the previous version before the colormap with the desired pivot was applied.

A temporary workaround is to call the cmocean command with your desired pivot after the figure is created; however, this should be fixed internally.

MFE:

plot(m,'type','bmesh','proj','merc','colormap',[30,-5 50], 'subdomain',[-74.4172  -73.4554 ;40.3119   41.0180],'pivot',0);

you can see that the colormap will not respect the pivot value.

You'd have to type

cmocean('-topo',30,'pivot',0);

for that pivot you want to be respected.