Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

zooming problem on figures with shared axes #2790

Copy link
Copy link
Closed
@jfmoulin

Description

@jfmoulin
Issue body actions

Hi!

I am trying to use axes shared across different figures and run into a funny effect when I resize one of the windows.
If I do:

import pylab as p
a0 = p.subplot(121) 
p.imshow(p.rand(100,100))
a1 = p.subplot(122,sharex=a0,sharey=a0)
p.imshow(p.rand(100,100)**2)
p.figure()
a2 = p.subplot(121,sharex=a0,sharey=a0)
p.imshow(p.rand(100,100)**3)

zooming into one of the axes does as expected: the other two follow.
However, when I resize one of the windows, all three axes zoom out completely (and not in one jump, it looks like seeing the image would be slowly falling away...)

Interestingly if I close the figures my shell still keeps on doing stuff backstage: my cpu is 100% busy. I tried this both under Ipython and a normal python shell.
Under Ipython a ctrl-C leads to the following traceback.

Original exception was:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk.py", line 435, in expose_event
    self._render_figure(self._pixmap, w, h)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtkagg.py", line 84, in _render_figure
    FigureCanvasAgg.draw(self)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/backends/backend_agg.py", line 451, in draw
    self.figure.draw(self.renderer)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/artist.py", line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/figure.py", line 1034, in draw
    func(*args)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/artist.py", line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/axes.py", line 2086, in draw
    a.draw(renderer)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/artist.py", line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/axis.py", line 1093, in draw
    renderer)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/axis.py", line 1042, in _get_tick_bboxes
    extent = tick.label1.get_window_extent(renderer)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/text.py", line 757, in get_window_extent
    bbox = bbox.translated(x, y)

thanks in advance!
JF

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.