Skip to content

Commit

Permalink
Merge pull request #1114 from dmcdougall/alpha
Browse files Browse the repository at this point in the history
Make grid accept alpha rcParam
  • Loading branch information
mdboom committed Aug 23, 2012
2 parents c981774 + aa3c9a0 commit b0393e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/matplotlib/axis.py
Expand Up @@ -412,6 +412,7 @@ def _get_gridline(self):
color=rcParams['grid.color'],
linestyle=rcParams['grid.linestyle'],
linewidth=rcParams['grid.linewidth'],
alpha=rcParams['grid.alpha'],
)
l.set_transform(self.axes.get_xaxis_transform(which='grid'))
l.get_path()._interpolation_steps = GRIDLINE_INTERPOLATION_STEPS
Expand Down Expand Up @@ -550,6 +551,7 @@ def _get_gridline(self):
color=rcParams['grid.color'],
linestyle=rcParams['grid.linestyle'],
linewidth=rcParams['grid.linewidth'],
alpha=rcParams['grid.alpha'],
)

l.set_transform(self.axes.get_yaxis_transform(which='grid'))
Expand Down
1 change: 1 addition & 0 deletions lib/matplotlib/rcsetup.py
Expand Up @@ -539,6 +539,7 @@ def __call__(self, s):
'grid.color' : ['k', validate_color], # grid color
'grid.linestyle' : [':', str], # dotted
'grid.linewidth' : [0.5, validate_float], # in points
'grid.alpha' : [1.0, validate_float],


# figure props
Expand Down
1 change: 1 addition & 0 deletions matplotlibrc.template
Expand Up @@ -271,6 +271,7 @@ text.hinting_factor : 8 # Specifies the amount of softness for hinting in the
#grid.color : black # grid color
#grid.linestyle : : # dotted
#grid.linewidth : 0.5 # in points
#grid.alpha : 1.0 # transparency, between 0.0 and 1.0

### Legend
#legend.fancybox : False # if True, use a rounded box for the
Expand Down

0 comments on commit b0393e9

Please sign in to comment.