Skip to content

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

Closed

Description

@PaleNeutron

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

Activity

  1. 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[/+] on Jul 15, 2022
  2. tacaswell commented on Jul 15, 2022

    @tacaswell
    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.

  3. added this to the milestone on Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions