Skip to content

custom_scale_example.py fails with axisbelow True #6312

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

Closed
efiring opened this issue Apr 18, 2016 · 1 comment
Closed

custom_scale_example.py fails with axisbelow True #6312

efiring opened this issue Apr 18, 2016 · 1 comment

Comments

@efiring
Copy link
Member

efiring commented Apr 18, 2016

Tested in master with the qt4agg backend on OSX, examples/api/custom_scale_example.py fails at the point of drawing the y-label unless rcParams[axes.axisbelow] = False. This has always been the default, but #6287 proposes a change to a new option, which triggers the failure. Modifying the example to change axisbelow to True also triggers it, with the following traceback:

(test)efiring@manini2:~/work/programs/py/mpl/matplotlib/examples$ python api/custom_scale_example.py
Traceback (most recent call last):
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/backends/backend_qt5agg.py", line 179, in __draw_idle_agg
    FigureCanvasAgg.draw(self)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py", line 464, in draw
    self.figure.draw(self.renderer)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/artist.py", line 68, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/figure.py", line 1262, in draw
    renderer, self, dsu, self.suppressComposite)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images
    a.draw(renderer)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/artist.py", line 68, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/axes/_base.py", line 2361, in draw
    mimage._draw_list_compositing_images(renderer, self, dsu)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images
    a.draw(renderer)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/artist.py", line 68, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/axis.py", line 1142, in draw
    self.label.draw(renderer)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/artist.py", line 68, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/matplotlib/text.py", line 762, in draw
    raise ValueError("posx and posy should be finite values")
ValueError: posx and posy should be finite values
@efiring efiring added this to the 2.1 (next point release) milestone Apr 18, 2016
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Oct 3, 2017
@anntzer
Copy link
Contributor

anntzer commented Jan 16, 2020

This was fixed (somewhat accidentally?) by #11417.

@anntzer anntzer closed this as completed Jan 16, 2020
@story645 story645 removed this from the future releases milestone Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants