Skip to content

Commit

Permalink
Merge pull request #784 from mperrin/bugfix_monthly_trending_plot
Browse files Browse the repository at this point in the history
fix some display issues in monthly_trending_plot
  • Loading branch information
obi-wan76 authored Jan 23, 2024
2 parents 6d14705 + 1da0b00 commit dea6477
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webbpsf/trending.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,8 @@ def basic_show_image(image, ax, vmax=.3, nanmask=1):
fig = plt.figure(constrained_layout=False, figsize=(16, 10), )

subfigs = fig.subfigures(2, 1, hspace=0.02, height_ratios=[2, 2], )
for sf in subfigs:
sf.set_facecolor('none') # work around display issue that was hiding the connection patches

min_n_im_axes = 12
im_axes = subfigs[0].subplots(3, max(npoints,min_n_im_axes),
Expand Down Expand Up @@ -1229,6 +1231,7 @@ def basic_show_image(image, ax, vmax=.3, nanmask=1):
plot_index = -1
from matplotlib.patches import ConnectionPatch

ax0ymax = axes[0].get_ylim()[1] # for use in connection patches below
for i, row in enumerate(opdtable):
if verbose:
print(row['fileName'], row['date'],
Expand Down Expand Up @@ -1256,7 +1259,7 @@ def basic_show_image(image, ax, vmax=.3, nanmask=1):

# Make a fancy connector line from the OPD plots to the correct time in the time series plots
# Draw this for all sensing instances pre-move, but no need to repeat for any post-correction sensing
cp = ConnectionPatch([0.5, 0], (dates_array[i].plot_date, 150),
cp = ConnectionPatch([0.5, 0], (dates_array[i].plot_date, ax0ymax),
coordsA='axes fraction', coordsB='data',
axesA=im_axes[2, plot_index], axesB=axes[0],
color='darkgreen', ls='--', alpha=0.5
Expand Down

0 comments on commit dea6477

Please sign in to comment.