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
188 stars 68 forks source link

allowing user to set axis limits when plotting #224

Closed krober10nd closed 3 years ago

krober10nd commented 3 years ago
krober10nd commented 3 years ago

@WPringle check out test_plotting didn't have much time to work on this today but we should have a routine that goes through the majority of combinations for plotting and visualize them to make sure it makes sense. Can't really automatically do this...

krober10nd commented 3 years ago

I'll wait for #221 to get merged and then rebase this before testing. Although probably should expand testing to all combinations of plotting as there some untested configurations.

WPringle commented 3 years ago

@WPringle check out test_plotting didn't have much time to work on this today but we should have a routine that goes through the majority of combinations for plotting and visualize them to make sure it makes sense. Can't really automatically do this...

yeah that's funny how it prompts you to agree that it "looks right?". I wonder if you could count pixels or something silly like that.

krober10nd commented 3 years ago

The only way I think to test plotting off the top of my head would be to have a bunch of reference images and compute the spatial correlation between the images. However, this is overkill imo.

krober10nd commented 3 years ago

I think this fine to go for now. The testing of the plotting just runs through some common configurations to ensure some configuration doesn't break as we add future codes (labels, ticks, titles, colorbars, log options, etc.).

WPringle commented 3 years ago

Made some small corrections to the other tests as shown in the commit.

For the plotting test some of those options don't really work together (e..g, 'trinotri') but maybe it's good to know it doesn't error?

krober10nd commented 3 years ago

Yea, basically the idea is to test the API and make sure there's no failure. Perhaps in the future combinations of options that don't make sense would result in some feedback for the user.