3

I would like to generate inline plot instead of plot that popping out in python3.x. All of the solution I found when browsing around is with IPython/jupyter notebook, however, I am running my script using terminal, i.e python3 <script>.py, and every time I run plt.show() it always popping a new window of the result.

How can I achieve inline plot in this scenario?

Any help would be appreciated.

Darren Christopher
  • 3,893
  • 4
  • 20
  • 37
  • https://stackoverflow.com/questions/20295646/python-ascii-plots-in-terminal – freude Mar 19 '19 at 02:48
  • 1
    You are asking how to render an image in an ascii terminal. That's not possible. I marked as duplicate of a Q&A showing how to produce ascii plots, which is the closest to what you can achieve. – ImportanceOfBeingErnest Mar 19 '19 at 03:23
  • 2
    @ImportanceOfBeingErnest To render an image in a terminal (and some terminal emulators) is perfectly possible, and matplotlib backends [might exist already](https://github.com/koppa/matplotlib-sixel). This question should not be marked as duplicate. – durum Sep 13 '19 at 14:05
  • @durum if you think `matplotlib-sixel` will answer this question, you can provide such answer in the duplicate. – ImportanceOfBeingErnest Sep 13 '19 at 14:07
  • @durum We could also mark as duplicate of [this question](https://stackoverflow.com/questions/37288421/how-to-plot-a-chart-in-the-terminal?noredirect=1&lq=1) instead? (That would also be a good place to tell people about matplotlib-sixel backend.) – ImportanceOfBeingErnest Sep 13 '19 at 14:19
  • @ImportanceOfBeingErnest came back very very late, but if someone is still struggling with this I added my answer here: https://stackoverflow.com/a/62084292/2173750 – durum May 29 '20 at 10:59

0 Answers0