I’m looking for some help understanding how I can add new lines to my matplotlibrc but I’m struggling to correlate the default matplotlibrc to the api.
For example if I want to have axis ticks only show up on the bottom and left axes how would I add that to mapltlotlibrc?
Unfortunately, I’m not sure that the matplotlibrc file will cover every type of customization. If you don’t find it on the customization page (http://matplotlib.org/users/customizing.html), then it might not be possible to have it be a default.
In principle, I like the matplotlibrc file; however, it does cause some problems if you are distributing code to colleagues. When they run your code, the plots will not look the same unless they have your rc parameters as well. Perhaps an alternative would be to write a small module that you could import/distribute. Set the PYTHONPATH variable (https://docs.python.org/2/using/cmdline.html#environment-variables), so that it is importable in any script. It could look something like this:
mpl_format.py
import matplotlib.pyplot as plt
plt.rc(‘lines’, linewidth=2, color=‘r’)
plt.rc(‘font’, size=16.0)
def ax_format(axes):
axes.get_xaxis().tick_bottom()
axes.get_yaxis().tick_left()
···
On Thu, Sep 11, 2014 at 1:18 PM, Jonno <jonnojohnson@…287…> wrote:
I’m looking for some help understanding how I can add new lines to my matplotlibrc but I’m struggling to correlate the default matplotlibrc to the api.
For example if I want to have axis ticks only show up on the bottom and left axes how would I add that to mapltlotlibrc?