-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
imshow with log/symlog scales fails to produce figures without raising an Exception #3931
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
Labels
Milestone
Comments
When I run this I get all sorts of warnings: /home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/image.py:357: UserWarning: Images are not supported on non-linear axes.
warnings.warn("Images are not supported on non-linear axes.")
/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/transforms.py:2557: RuntimeWarning: divide by zero encountered in double_scalars
x_scale = 1.0 / inw
/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/transforms.py:2558: RuntimeWarning: divide by zero encountered in double_scalars
y_scale = 1.0 / inh
/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axis.py:1001: UserWarning: Unable to find pixel distance along axis for interval padding of ticks; assuming no interval padding needed.
needed.")
/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axis.py:1011: UserWarning: Unable to find pixel distance along axis for interval padding of ticks; assuming no interval padding needed.
needed.")
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_qt5.py", line 430, in idle_draw
self.draw()
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_qt5agg.py", line 143, in draw
FigureCanvasAgg.draw(self)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_agg.py", line 475, in draw
self.figure.draw(self.renderer)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/artist.py", line 60, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/figure.py", line 1094, in draw
func(*args)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/artist.py", line 60, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axes/_base.py", line 2006, in draw
self.apply_aspect()
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axes/_base.py", line 1193, in apply_aspect
if aspect_scale_mode == "log":
UnboundLocalError: local variable 'aspect_scale_mode' referenced before assignment
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_qt5.py", line 430, in idle_draw
self.draw()
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_qt5agg.py", line 143, in draw
FigureCanvasAgg.draw(self)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_agg.py", line 475, in draw
self.figure.draw(self.renderer)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/artist.py", line 60, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/figure.py", line 1094, in draw
func(*args)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/artist.py", line 60, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axes/_base.py", line 2006, in draw
self.apply_aspect()
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axes/_base.py", line 1193, in apply_aspect
if aspect_scale_mode == "log":
UnboundLocalError: local variable 'aspect_scale_mode' referenced before assignment
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_qt5.py", line 341, in resizeEvent
self.draw()
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_qt5agg.py", line 143, in draw
FigureCanvasAgg.draw(self)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_agg.py", line 475, in draw
self.figure.draw(self.renderer)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/artist.py", line 60, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/figure.py", line 1094, in draw
func(*args)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/artist.py", line 60, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axes/_base.py", line 2006, in draw
self.apply_aspect()
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axes/_base.py", line 1193, in apply_aspect
if aspect_scale_mode == "log":
UnboundLocalError: local variable 'aspect_scale_mode' referenced before assignment
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_qt5.py", line 341, in resizeEvent
self.draw()
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_qt5agg.py", line 143, in draw
FigureCanvasAgg.draw(self)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_agg.py", line 475, in draw
self.figure.draw(self.renderer)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/artist.py", line 60, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/figure.py", line 1094, in draw
func(*args)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/artist.py", line 60, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axes/_base.py", line 2006, in draw
self.apply_aspect()
File "/home/tcaswell/.virtualenvs/dd_py3/lib/python3.4/site-packages/matplotlib-1.5.dev1-py3.4-linux-x86_64.egg/matplotlib/axes/_base.py", line 1193, in apply_aspect
if aspect_scale_mode == "log":
UnboundLocalError: local variable 'aspect_scale_mode' referenced before assignment
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True Some of which wight also be bugs... Can you try running this as a script or in a non-notebook ipython session? I suspect that the notebook is snarfing something it should not be... |
No answer in 2.5 years, so closing. @eyurtsev please re-open or open a new issue if you still have the issue with latest Matplotlib. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I don't know if it makes sense to use imshow with non-linear scales. However, it would be nice if imshow at least raised an Exception in the cases where it's supposed to fail.
matplotlib v 1.4.2
The text was updated successfully, but these errors were encountered: