Open montanaviking opened 7 years ago
Can you provide a more complete test case for your function? Just a bit of sample code that is enough to wrap your function would be enough.
I'm quite confident that I have a fix, but I'd like to produce a test case to verify it before I try to get it pulled back into the project.
I am noticing the following warning messages when I clear data from a Smith chart plot using ax.clear(). /usr/local/lib/python3.4/dist-packages/smithplot/smithaxes.py:1060: DeprecationWarning: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer. for xs in np.linspace(x0, x1, x_div + 1)[1:]: /usr/local/lib/python3.4/dist-packages/smithplot/smithaxes.py:1064: DeprecationWarning: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer. for ys in np.linspace(y0, y1, y_div + 1)[1:]: #####################################################################################################################
My code follows below and removing the ax.clear() removed the above warning messages. replacing ax.clear() with ax.cla() gave the same results. #############################################################
plot points and/or curves on Smith Chart
def plot_smith(data,canvas=None,figure=None,datatype="reflection",plottype="points",title="",interpolate=0,pointsonly=True): Z0=50. if canvas==None or figure==None: raise ValueError("ERROR! One of canvas or figure missing") if datatype.lower()=="reflection" or datatype.lower()=="r": datatype=SmithAxes.S_PARAMETER elif datatype.lower()=="impedance" or datatype.lower()=="z": datatype=SmithAxes.Z_PARAMETER elif datatype.lower()=="admittance" or datatype.lower()=="y": datatype=SmithAxes.Y_PARAMETER
fig=FigureCanvas(figure=plt.figure(1,figsize=(8,8),frameon=False))
#####################################################################################################################
if I remove the ax.clear() line