--- lang: ja-jp breaks: true --- # Python を Visual Studio Code でインタラクティブに実行(Jupyter Notebookみたいな) 2021-07-22 ## 実行したい処理毎に `#%%` を記載することでインタラクティブに実行可能 ```python= #%% import matplotlib.pyplot as plt plt.rcParams["font.family"] = "Meiryo" x_list = [5 , 6, 7, 8, 9] y_list = [50, 40, 30, 20, 10] plt.plot(x_list, y_list) plt.show(); ``` ![](https://i.imgur.com/oY3Wxxs.png) ## `Ctrl + Enter`でインタラクティブに実行 ![](https://i.imgur.com/FyLNSzl.png) ###### tags: `Python` `Visual Studio Code` `Jupyter Notebook`