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

Final matplotlib 2.0 compatibility fixes #1264

Merged
merged 2 commits into from
Apr 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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