mspass-team / mspass

Massive Parallel Analysis System for Seismologists
https://mspass.org
BSD 3-Clause "New" or "Revised" License
28 stars 11 forks source link

Fix graphics #513

Closed pavlis closed 4 months ago

pavlis commented 4 months ago

Two things in this set of changes:

  1. Fixed a long standing bug that messed up scaling of plots in the "wtvaimg" mode. Fix may not be perfect, but is an improvement over present form that produces really bad plots in that mode most of the time. The possible residual issue is that we may need to handle the "aspect" parameter for image plotting more elegantly. I'm not sure with these changes a user can actually change the aspect ratio manually. I don't expect that to be a very common need though so I didn't think the effort required to test all the possibilities was worth the trouble.
  2. I changed the default style to "wtva" (wiggle trace variable area) instead of "wtvaimg" (the style that previously was giving trouble). Maybe should be the simplest "wt" but in most cases wtva plots are a better data visualization that wt - an option though.
codecov[bot] commented 4 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (b45b04c) 55.08% compared to head (53f5804) 55.08%.

Files Patch % Lines
python/mspasspy/graphics.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #513 +/- ## ======================================= Coverage 55.08% 55.08% ======================================= Files 144 144 Lines 22429 22429 ======================================= Hits 12356 12356 Misses 10073 10073 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pavlis commented 4 months ago

@wangyinz I urge you to merge this branch with master. It fixes a long standing bug in graphics with the "wtvaimg" style of plot. The only check that is flagging anything is coverage. It is complaining the new sections aren't being tested. I have no idea how to create a pytest function to test this kind of functionality. The best way to test the graphics module is to run the graphics tutorial and verify it works correctly. Anyway, I would urge you to review what I did and merge this branch with master.