Saving the 'summary plot' in CDK returns an error with an empty plot

I’m trying to save the summary plot in CDK and it returns this error with an empty plot saved in the folder:

”<Figure size 640x480 with 0 Axes>”

I’m using the following code to save the plot:

pr.plot_summary(data)
plt.savefig(“summary_plot.png”, bbox_inches=‘tight’)

Important note: This issue appears to exist only on ‘hub.nucleus.engineering’ and not on our internal jupyter hub.

Hi Surendra, Im surprised you’ve gotten it to work internally with that line for plot_summary specifically. With the current CDK internally, there also isnt that functionality. However, Ill add it right now (thanks for catching it!), and when we update nucleus CDK version this week, it will have that! For now, save the fig manually by right clicking on the figure.

That’s good to know. Thank you so much

Code updated (pulled internally too). Now waiting internal push to Nucleus

in the new version, you will call:

g = pr.plot_summary(data)
g.savefig(“summary_plot.png”, bbox_inches=‘tight’)

I have also updated the templates to give you this suggestion.

2 Likes