-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Description
Python 2.7, Linux, annaconda3, pyart environment, matplotlib version 1.5.3
Generic Code
import matplotlib.pyplot as plt
fig=plt.figure(figsize=(10,3)) # Width by Height;
ax = fig.gca()
#variables
zh=[90,10,15,20,30,40,50,60]
zdr=[-10,-20,10,5,2,3,4,8]
ax.scatter(zh,zdr)
ax.axis(0,60,-10,10)
fig.show()Issue:
File "/home/ubo/anaconda3/envs/pyart_env/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 1554, in axis
if len(v) != 4:
TypeError: object of type 'int' has no len()
The limits aren't restricted on Graph:

I have found a temporary work around
For line 1553 commenting out the v=v[0]
#v=v[0]
#commented out as v=v[0] would always =1 also if a changing limit set to rule out clutter then you
would still need v=4 but v[0]=xmin[:] instead etc.
This produces a graph with the limits specified:
Reactions are currently unavailable
