Home > Software engineering >  How can I open plot viewer in vs code jupyter?
How can I open plot viewer in vs code jupyter?

Time:03-18

I am using python to plot in VS code Jupiter on my Mac. The plot is shown in the Interactive View, while I cannot do more thing like zoom or save in the view. I refer to enter image description here

If still does not work please check the version of the Python and Jupyter extensions.

CodePudding user response:

Default the renderer used in Interactive Python windows uses the PNG renderer.

You can change it to use the TkAgg renderer (external window)

Add %matplotlib to the script

%matplotlib
import seaborn as sns
import numpy as np

x = np.random.randn(100)
ax = sns.distplot(x)

You can use other plot renderers

  • Related