patjdixon Posted June 5, 2023 Share Posted June 5, 2023 I have a DataLab script that has worked until R60. Now I get InvalidIndexError: (slice(None, None, None), None) on the "plot" argument of matplotlib.pyplot. I suspect the issue is that the format of the ydata argument has changed: Lab_Pred_Fig = plt.figure(figsize=[20,10]) ax = Lab_Pred_Fig.add_subplot(1, 1, 1) ax.plot(xdata, ydata) xdata is a simple list, but ydata is obtained from a spy.pull as shown here: How do I fix this in R60? Link to comment Share on other sites More sharing options...
patjdixon Posted June 5, 2023 Author Share Posted June 5, 2023 I have a partial answer: this works ax.plot(xdata, ydata["Lab_Opacity_PRED"]) Is there a better way? I want to take the spy.pull signal and convert it to a list without having to specify the name of the attribute; just remove the timestamps. Link to comment Share on other sites More sharing options...
patjdixon Posted June 5, 2023 Author Share Posted June 5, 2023 Here is the fix: ax.plot(xdata, ydata[Lab_Pred_DF_Plot_RampCond["Name"]], color=ydatacolor[YDataRow], linestyle=ydatalinetype[YDataRow]) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now