Michael Droettboom wrote:
> Which backend are you using? I don't see any explicit calls to chdir in
> matplotlib that would make this happen. It would certainly be
> unintentional if it is.
I don't know about any other back-ends, but the wx FileDialog has an
option to change the working dir when the user selects a file I also
don't know if this flag is set in the MPL code, but it shouldn't be.
> Søren Nielsen wrote:
>> my program can
>> no longer locate the icons (used in my GUI) that I am using in my
>> .\ressources directory. So saving the plot changed the working
>> directory of my program?
>> How do I change it back? Isn't this an error in matplotlib?
I'd say yes, but it's also an error in the design of your code -- as
you've discovered, the working dir is a tenuous concept -- you should
set that resources dir in your code start-up and keep it around for when
you need it.
wxPython has wx.StandardPaths which can be helpful for finding your aps
data, etc -- I'm sure the other toolkits have something, too.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
|