python - Specify path of savefig with pylab or matplotlib -
i struggling on how find correct way specify save path (or repository) when calling function savefig in matplotlib or pylab.
i tried several syntaxes, everytime python console returns :
filenotfounderror: [errno 2] no such file or directory: '../mydocs/resource/frames/myimage.png'
currently, have written following :
pylab.savefig('../mydocs/resource/frames/myimage.png') does know how it?
thanks in advance!
the tilde operator , variable $home entered strings , therefore not function while saving. have provide either relative path (as did) or provide full path. eg. pylab.savefig("/home/username/desktop/myfig.png").
Comments
Post a Comment