Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a new "narrow" slider for tsview.py #764

Merged
merged 3 commits into from
Apr 23, 2022
Merged

a new "narrow" slider for tsview.py #764

merged 3 commits into from
Apr 23, 2022

Conversation

yunjunz
Copy link
Member

@yunjunz yunjunz commented Apr 22, 2022

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

Screen Shot 2022-04-22 at 2 47 40 PM

Reminders

  • Pass Codacy code review (green)
  • Pass Circle CI test (green)
  • If modifying functionality, describe changes to function behavior and arguments in a comment below the function declaration.
  • If adding new functionality, add a detailed description to the documentation and/or an example.

yunjunz added 3 commits April 22, 2022 15:33
…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()
@yunjunz yunjunz merged commit bbb2ce2 into insarlab:main Apr 23, 2022
@yunjunz yunjunz deleted the tsview branch April 23, 2022 00:16
@yunjunz yunjunz mentioned this pull request May 2, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant