a new "narrow" slider for tsview.py#764
Merged
yunjunz merged 3 commits intoinsarlab:mainfrom Apr 23, 2022
Merged
Conversation
…values + utils/plot.auto_adjust_colormap_lut_and_disp_limit(): add unique_values as the 3rd return arg & update its usage in save_kmz.py, view.py and tsview.py + utils/plot.plot_colorbar(): use unique_values to set tick locations if they are <=5 + utils/plot.read.gmt_lonlat_file(): ignore comment lines + utils/utils.read_timeseries_yx(): bugfix for dis_std unit conversion + objects/sensor: add a few paramters for the GaoFen-3 sensor + objects/gps.get_gps_los_obs(): bugfix when input site_names are not consistent with CSV file + add Yunjun et al. (2022) with DOI to the following files: - defaults/smallbaselineApp.cfg: SET option - iono_tec.py - solid_earth_tides.py - simulation/iono.py
+ replace fig.canvas.draw() with "fig.canvas.draw_idle()" and "fig.canvas.flush_events()", as recommended by matplotlib (https://matplotlib.org/stable/users/explain/interactive_guide.html). This fixed the non-resposive point TS plot, with the latest version of matplotlib version 3..5.1. It's unknown since which version of matplotlib that this behavior change started to happen. Involved scripts are: - tsview.py - plot_transection.py - plot_coherence_matrix.py + tsview: update bar() plot in the slider, to make sure the vertical lines are within the slider extent + utils.plot: add add_arrow() from stack overflow + plot_transection: plot the profile location as dashed arrow instead of dashed line, to indicate the profile direction, via plot.add_arrow().
+ tsview: switch to a new look of "slider" in tsview.py. The main changes are: 1. use a narrower slider on the Y-axis, for a more compact looking. 2. The slider is solely based on image number, instead of time, to be agnostic against TS files with different time gaps. 3. Plot the reference date as a "gray" dot on the slider, to be more visible. 4. use subplot() with tight_layout() to better scale the subplots + utils.ptime: add get_compact_isoformat()
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
This PR adds two changes to
tsview.py:replace fig.canvas.draw() with "fig.canvas.draw_idle()" and "fig.canvas.flush_events()", as recommended by matplotlib (https://matplotlib.org/stable/users/explain/interactive_guide.html). This fixed the non-resposive point TS plot, with the latest version of matplotlib version 3.5.1. It's unknown since which version of matplotlib that this behavior change started to happen.
switch to a new "narrow-looking" slider in tsview.py, as shown below
Reminders