python - Matplotlib with Eclipse PyDev is not plotting -
i have following problem when using matplotlib in eclipse pydev.
import datetime import matplotlib.pyplot plt import numpy np import pandas pd import sklearn ... # plot results fig = plt.figure() fig.patch.set_facecolor('white') # plot price of spy etf ax1 = fig.add_subplot(211, ylabel='spy etf price in $') bars['close'].plot(ax=ax1, color='r', lw=2.) # plot equity curve ax2 = fig.add_subplot(212, ylabel='portfolio value in $') returns['total'].plot(ax=ax2, lw=2.) fig.show()
i left out calculations in between. happens when run program python launcher starts , disappears after 1 second.
i tried solve problem on mac osx , on ubuntu , in both cases did not work.
when using idle on other hand works , come out following output:
in general matplotlib works eclipse displayed output of following code:
import matplotlib.pyplot plt import matplotlib.pylab pylab plt.plot([1,2,3,4]) plt.ylabel('some numbers') plt.show()
i set backend template in ~/.matplotlib/matplotlibrc,
to
backend : qt4agg
maybe has idea why can not plot in eclipse. thank you!
Comments
Post a Comment