Skip to content

matplotlibrc and the XDG base directory standard #2219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2013

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Jul 16, 2013

After updating Ipython (1.0dev) and Matplotlib (1.4.x), a warning comes up when starting the Ipython notebook:

UserWarning: Found matplotlib configuration in ~/.matplotlib. To conform with the >XDG base directory standard, this configuration location has been deprecated on >Linux, and the new location is now '/home/user/.config'. Please move your >configuration there to ensure that matplotlib will continue to find it in the future.

I tried to follow the instructions so I created a new directory 'matplotlib' in ~/.config and moved matplotlibrc there. However, no customization is taking place.

Is this a bug? I'm running Linux Mint 15 and as I said, Matplotlib 1.4 and Ipython 1.0dev.

@pelson
Copy link
Member

pelson commented Jul 16, 2013

The folder is not a hidden one inside the .config folder. So you would need to do:

mv ~/.matplotlib ~/.config/matplotlib

(noticing there is no dot in the latter)

[EDIT: replaced matplotlibrc for matplotlib]

@pelson
Copy link
Member

pelson commented Jul 16, 2013

Interestingly I wasn't getting this warning any more. Think I need to look into that...

Did this help?

@ghost
Copy link
Author

ghost commented Jul 16, 2013

Actually, that's the first thing I tried (moving matplotlibrc to ~/.config/matplotlibrc) but it doesn't apply the customizations anymore. For the record, I didn't have matplotlibrc in ~/.matplotlibrc. Instead, I used ~/.matplotlib/matplotlibrc.

@pelson
Copy link
Member

pelson commented Jul 16, 2013

Apologies. I had a typo in there. It should read:

mv ~/.matplotlib ~/.config/matplotlib

The matplotlibrc file which is being detected can be found with the function matplotlib.matplotlib_fname(). Where does that point?

@ghost
Copy link
Author

ghost commented Jul 16, 2013

Now it is working. Thanks!

Then I needed to rename the .matplotlib directory to matplotlib and move it to .config.

matplotlib.matplotlib_fname() shows /home/user/.config/matplotlib/matplotlibrc as it should be.

It would be nice to have a more explicit warning message about this change in the future.

@mdboom
Copy link
Member

mdboom commented Jul 16, 2013

Yes -- the message should be corrected. I have attached a patch for 1.3.x (so this will make it into 1.3.0 final -- the first release with this XDG change).

@ghost
Copy link
Author

ghost commented Jul 17, 2013

Great, thanks a lot.

mdboom added a commit that referenced this pull request Jul 17, 2013
matplotlibrc and the XDG base directory standard
@mdboom mdboom merged commit 5f28c79 into matplotlib:v1.3.x Jul 17, 2013
@mdboom mdboom deleted the xdg-message branch August 7, 2014 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants