[MacPorts] #65145: plotting problem using py39-matplotlib @3.5.2_0 in IPython with %matplotlib
MacPorts
noreply at macports.org
Mon May 9 19:12:11 UTC 2022
#65145: plotting problem using py39-matplotlib @3.5.2_0 in IPython with %matplotlib
---------------------------------+---------------------------
Reporter: aaronm6 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Keywords: matplotlib, ipython | Port: py-matplotlib
---------------------------------+---------------------------
Using py39-matplotlib @3.5.2_0 with IPython (py39-ipython @8.2.0_1) and
invoking the matplotlib inline display hook via `%matplotlib`, is causing
a plot-display issue. A figure can be opened, and will accept a plot
statement without complaint; however, nothing shows on the plot, until one
uses a graphical tool in the plot window (e.g. the zoom tool). The problem
does not occur with py39-matplotlib @3.5.1_0 (in this version, the plot
will be displayed as usual). Here are some example commands:
{{{
$ ipython3-3.9
Python 3.9.12 (main, Mar 25 2022, 04:56:27)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.2.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: %matplotlib
Using matplotlib backend: MacOSX
In [2]: from matplotlib import pyplot as plt
In [3]: plt.figure() # (a blank figure window is created)
Out[3]: <Figure size 1280x960 with 0 Axes>
In [4]: plt.plot([1,2,3],[1,2,3],'.')
Out[4]: [<matplotlib.lines.Line2D at 0x13f3540d0>]
}}}
Nothing happens; figure window still appears blank. Note that the
`%matplotlib` command invokes the inline display hook, and therefore
plotting does not require `plt.show()`. With earlier matplotlib versions
(including 3.5.1_0) the three desired data points, and plot axes, are
shown as expected.
No problems observed when not invoking the inline display hook (i.e.
`%matplotlib`)
Using macOS version 11.6.5
--
Ticket URL: <https://trac.macports.org/ticket/65145>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list