[Matplotlib-users] matplotlib interactive in a shell terminal?
Gösta Ljungdahl
gosta.ljungdahl at foi.se
Mon May 18 05:17:26 EDT 2020
Try
ipython --pylab
in a shell terminal.
/gostal
________________________________
Från: Matplotlib-users <matplotlib-users-bounces+gostal=foi.se at python.org> för Raphael Raccuia <rafael.raccuia at blindekinder.com>
Skickat: den 18 maj 2020 10:33:53
Till: matplotlib-users at python.org
Ämne: [Matplotlib-users] matplotlib interactive in a shell terminal?
Hi,
Any chance to use matplotlib in a linux shell terminal?
if I make 'python3 my/script.py', it displays the plot but I have no
prompt >>>.
It works in Idle.
That would be my test script:
#!/usr/bin/env python3 #otherwise loads a 'ghost': cursor turn to cross,
but no window.
import matplotlib
print(matplotlib.get_backend()) #print TkAgg in the terminal
import matplotlib.pyplot as plt
plt.ion()
plt.plot([1, 2, 3, 4], [1, 4, 2, 3])
plt.show(block=True) #block=True: othewise it close immediately plot and
terminal
thank you!
rph-r
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
https://mail.python.org/mailman/listinfo/matplotlib-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20200518/7cf01b68/attachment.html>
More information about the Matplotlib-users
mailing list