Skip to content

[Bug]: rcParams["figure.figsize"] will be reset the first time plt.plot invoke #23428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PaleNeutron opened this issue Jul 15, 2022 · 1 comment

Comments

@PaleNeutron
Copy link

PaleNeutron commented Jul 15, 2022

Bug summary

plt.rcParams["figure.figsize"] will be reset the first time plt.plot invoke.

Code for reproduction

import pandas as pd
import matplotlib.pyplot as plt

data = [[78, 37,  8],
       [35, 40, 79],
       [73,  0, 88],
       [80, 51, 55],
       [78, 34, 10],
       [73, 45,  0],
       [73, 43, 49],
       [15, 32, 76],
       [27, 70, 13]]
df = pd.DataFrame(data)
df
plt.rcParams["figure.figsize"] = [12, 6]
plt.plot(df)
plt.show()
print(plt.rcParams["figure.figsize"])
plt.rcParams["figure.figsize"] = [12, 6]
plt.plot(df)
plt.show()

Actual outcome

image

Expected outcome

figure size is 12,6 the first time

Additional information

No response

Operating system

windows & linux

Matplotlib Version

3.5.2

Matplotlib Backend

module://matplotlib_inline.backend_inline

Python version

Python 3.10.5

Jupyter version

6.4.12

Installation

pip

@PaleNeutron PaleNeutron changed the title [Bug]: rcParams["figure.figsize"] will be reset the first time plt.plot` invoke [Bug]: rcParams["figure.figsize"] will be reset the first time plt.plot invoke Jul 15, 2022
@tacaswell
Copy link
Member

This is a known and fixed bug which was exposed by 3.5.2 and fixed by ipython/matplotlib-inline#14 but I think we need a new release of matplotlib-inline.

@tacaswell tacaswell added this to the unassigned milestone Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants