Skip to content

Commit

Permalink
Merge pull request #20 from sot/shiny
Browse files Browse the repository at this point in the history
Updates for matplotlib 3.2
  • Loading branch information
taldcroft authored Oct 14, 2020
2 parents 986cace + 9611cfb commit 1b0112a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/esaview.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import numpy as np
import matplotlib
matplotlib.use('TkAgg')
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
from matplotlib.figure import Figure
from mpl_toolkits.axes_grid1 import make_axes_locatable
from mpl_toolkits.mplot3d import Axes3D
Expand Down Expand Up @@ -157,7 +157,7 @@ def update(self, *args):
i1 = imgs_idx_map[i1]
img = imgs[i0:i1+1].sum(0)

img_rgba = matplotlib.cm.spectral(img / 7.2)
img_rgba = matplotlib.cm.nipy_spectral(img / 7.2)
img_rgba[:, :, 3] = alpha_slider.value.get()
self.image.set_data(img_rgba)
self.ax.set_title(get_date(i_center))
Expand Down Expand Up @@ -443,7 +443,7 @@ def value_changed(self, scaleval):
image_canvas = FigureCanvasTkAgg(fig, master=image_frame)
image_canvas.get_tk_widget().pack(side=Tk.LEFT, fill=Tk.BOTH, expand=1)

image_toolbar = NavigationToolbar2TkAgg(image_canvas, image_frame)
image_toolbar = NavigationToolbar2Tk(image_canvas, image_frame)
image_toolbar.update()
image_canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)

Expand Down

0 comments on commit 1b0112a

Please sign in to comment.