Skip to content

Commit

Permalink
Merge pull request #1264 from ioam/mpl2_compat
Browse files Browse the repository at this point in the history
Final matplotlib 2.0 compatibility fixes
  • Loading branch information
jlstevens authored Apr 10, 2017
2 parents 9a0a2fd + dc8000f commit 55a63f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion holoviews/plotting/mpl/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def _set_aspect(self, axes, aspect):
data_ratio = 1./(ysize/xsize)
if aspect != 'square':
data_ratio = data_ratio/aspect
axes.set_aspect(data_ratio)
axes.set_aspect(float(data_ratio))


def _set_axis_limits(self, axis, view, subplots, ranges):
Expand Down
4 changes: 2 additions & 2 deletions tests/testplotinstantiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,9 @@ def test_dynamic_streams_refresh(self):
dmap = DynamicMap(lambda x, y: Points([(x, y)]),
kdims=[], streams=[stream])
plot = mpl_renderer.get_plot(dmap)
plot.initialize_plot()
pre = mpl_renderer(plot, fmt='png')
plot.state.set_dpi(72)
stream.update(x=1, y=1)
plot.refresh()
post = mpl_renderer(plot, fmt='png')
self.assertNotEqual(pre, post)

Expand All @@ -156,6 +155,7 @@ def history_callback(x, history=deque(maxlen=10)):
plot = mpl_renderer.get_plot(dmap)
mpl_renderer(plot)
for i in range(20):
plot.state.set_dpi(72)
stream.update(x=i)
x, y = plot.handles['artist'].get_data()
self.assertEqual(x, np.arange(10))
Expand Down

0 comments on commit 55a63f4

Please sign in to comment.