← Back to team overview

yade-users team mailing list archive

Re: save python figure

 

Hi,

yade.plot.saveGnuplot("diagramName")



2010/7/21 chiara modenese <c.modenese@xxxxxxxxx>

> Hi,
>
> I want to save in a figure, without showing it, the output from
> utils.plotDirections(), say just before the triaxial phase. How to do it in
> python? I checked in utils.py code and there a pylab.show() a the end of the
> function plotDirections. But how do I save the figure and avoid to display
> it? I know I could stop the simulation, display it and then restart running
> but I want to do it automatically so saving the figure would be the better.
> I tried something like
>
> pylab.gcf().savefig('/home/chia/Desktop/directions.png')
>
> but with no success as the code always just displays it. Any suggestions?
>
> cheers, Chiara
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help   : https://help.launchpad.net/ListHelp
>
>

References