question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate Plots, notebook displays twice

See original GitHub issue

I am starting IPython Notebook with ipython notebook --pylab=inline and then plotting using plot_acf. I am currently getting the resulting plots duplicated:

image

What am I doing wrong here?

Standard pandas plotting using returns_sq.plot() works fine (only one resulting plot).

Issue Analytics

  • State:open
  • Created 10 years ago
  • Reactions:14
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

52reactions
cancan101commented, Dec 22, 2013

This seems to be caused by the plot_acf function both plotting the graph AND returning the results which then causes IPython Notebook to plot the results again. If instead I assign the results to a variable, then I get only a single plot: x = plot_pacf(...)

24reactions
lightalchemistcommented, Apr 21, 2018

For anyone looking for a quick hack around this, it is possible to suppress the returned output from being evaluated by Jupyter simply by adding a semi-colon after the line: plot_acf(data); Not an ideal solution, but easier than most other hacks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is Jupyter showing charts twice? - python - Stack Overflow
It's working, but every time I plot a chart, the chart shows up twice. The first two charts in my notebook are plotted...
Read more >
Matplotlib graphs are being duplicated each time
I have the issue that anything I plot appears twice. I am not sure why this is happening, so I am looking for...
Read more >
Any way to repeat a plot? : r/IPython - Reddit
To give figures with numbered captions. Although to get it to work properly I had to disable the automatic display of figures, otherwise...
Read more >
How To Stop Plots Printing Twice In Jupyter When Using ...
Debugging is twice as hard as writing the code in the first place. ... Scientific Bindery Productions. monitor Duplicate Plots, notebook displays twice...
Read more >
Working with Jupyter code cells in the Python Interactive window
Visual Studio Code supports working with Jupyter Notebooks natively, ... Within the Python Interactive window, double-click any plot to open it in the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found