Y
Hacker News
new
|
ask
|
show
|
jobs
by
alanbernstein
2655 days ago
Would you suggest an alternative to pyplot? What problems does it cause for you?
1 comments
stilley2
2655 days ago
I had problems using pyplot over ssh because it can assume there's a display and fail when it couldn't find one. Maybe this has changed. I use the OO interface. For example
https://matplotlib.org/gallery/api/agg_oo_sgskip.html
link
jpeloquin
2655 days ago
Changing the plot backend should fix this.
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt
https://stackoverflow.com/questions/2801882/generating-a-png...
link
stilley2
2655 days ago
I believe Agg is only for bitmap output. While there are probably backends that work with a headless system, I find the OO option much more flexible.
link
p10_user
2655 days ago
Agg works for all outputs. I use it in combination with OO over ssh all the time.
link