Open DonJayamanne opened 1 month ago
Maybe as a workaround, creating a function would work for just changing the size of the graphs on the display but leaving the required parameter as a standard, so something like this:
import pandas as pd
import matplotlib.pyplot as plt
### standard parameters
plt.rcParams['figure.figsize'] = (6, 4)
plt.rcParams['figure.dpi'] = 300
data = {
"X": [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
"Y": [0.01, 0.04, 0.09, 0.16, 0.25, 0.36, 0.49, 0.64, 0.81, 1.00]
}
df = pd.DataFrame(data)
def plot_dataframe(df, override=False):
if override=True:
plt.figure(figsize=(6,4), dpi=150)
plt.plot(df.X, df.Y, '-o')
plt.show()
if override=False:
plt.plot(df.X, df.Y, '-o')
plt.show()
Hope it helps,
Best
Discussed in https://github.com/microsoft/vscode-jupyter/discussions/16091