Thanks to visit codestin.com
Credit goes to github.com

Skip to content

custom_scale_example.py fails with axisbelow True #6312

Closed
@efiring

Description

@efiring

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions