AlexeyPechnikov / pygmtsar

PyGMTSAR (Python InSAR): Powerful and Accessible Satellite Interferometry
http://insar.dev/
BSD 3-Clause "New" or "Revised" License
427 stars 95 forks source link

[Help]: Baseline pairs plot, and time graph #167

Open mateosanchezospina opened 1 month ago

mateosanchezospina commented 1 month ago

Hi, Putting SBAS processing into practice, I was faced with the question of how to remove the dates corresponding to each image (point) within the time graph of the baseline pairs. I want to avoid a blurry view, where only each point connected to its pair is visible.

Any help would be very helpful

associated image

image

AlexeyPechnikov commented 1 month ago

You can scale the image and/or the labels font to ensure that all the labels fit properly. The default global settings used in the example notebooks are:

plt.rcParams['figure.figsize'] = [12, 4]
plt.rcParams['figure.dpi'] = 100

To adjust these settings for a single plot, you can override them temporarily with the following code:

with mpl_settings({'figure.dpi': 300, 'figure.figsize': (48,8)}):
    sbas.plot_baseline(baseline_pairs_best)

Additionally, the size of the label text can be adjusted as follows:

with mpl_settings({'figure.dpi': 300, 'figure.figsize': (48,8), 'font.size': 16}):
    sbas.plot_baseline(baseline_pairs_best)

or just

with mpl_settings({'figure.dpi': 300, 'font.size': 6}):
    sbas.plot_baseline(baseline_pairs_best)

P.S. Setting the font size to zero ('font.size': 0) removes all the labels from the plot.​