10000 Fixing osx makefile by fgb · Pull Request #4 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fixing osx makefile #4

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

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow setting of default histogram type from matplotlibrc
This change doesn't yet include documentation updates
  • Loading branch information
Nicholas Devenish authored and fgb committed Feb 23, 2011
commit 36708dbd96a9300a95b2de208657b05b85ce6424
12 changes: 7 additions & 5 deletions lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7428,15 +7428,15 @@ def get_shared_y_axes(self):

@docstring.dedent_interpd
def hist(self, x, bins=10, range=None, normed=False, weights=None,
cumulative=False, bottom=None, histtype='bar', align='mid',
cumulative=False, bottom=None, histtype=None, align='mid',
orientation='vertical', rwidth=None, log=False,
color=None, label=None,
**kwargs):
"""
call signature::

def hist(x, bins=10, range=None, normed=False, weights=None,
cumulative=False, bottom=None, histtype='bar', align='mid',
cumulative=False, bottom=None, histtype=None, align='mid',
orientation='vertical', rwidth=None, log=False,
color=None, label=None,
**kwargs):
Expand Down Expand Up @@ -7506,7 +7506,8 @@ def hist(x, bins=10, range=None, normed=False, weights=None,
such that the first bin equals 1.

*histtype*: [ 'bar' | 'barstacked' | 'step' | 'stepfilled' ]
The type of histogram to draw.
The type of histogram to draw. If (*None*), the rc value is
used (by default, 'bar')

- 'bar' is a traditional bar-type histogram. If multiple data
are given the bars are aranged side by side.
Expand Down Expand Up @@ -7576,6 +7577,8 @@ def hist(x, bins=10, range=None, normed=False, weights=None,

# Validate string inputs here so we don't have to clutter
# subsequent code.
if histtype is None:
histtype = rcParams['hist.histtype']
if histtype not in ['bar', 'barstacked', 'step', 'stepfilled']:
raise ValueError("histtype %s is not recognized" % histtype)

Expand Down Expand Up @@ -7786,8 +7789,7 @@ def hist(x, bins=10, range=None, normed=False, weights=None,
patches.append( self.fill(x, y,
closed=False, facecolor=c) )
else:
patches.append( self.fill(x, y,
closed=False, edgecolor=c, fill=False) )
patches.append( self.plot(x, y,color=c) )

# adopted from adjust_x/ylim part of the bar method
if orientation == 'horizontal':
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,7 @@ def hexbin(x, y, C=None, gridsize=100, bins=None, xscale='linear', yscale='linea
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
@autogen_docstring(Axes.hist)
def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log=False, color=None, label=None, hold=None, **kwargs):
def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype=None, align='mid', orientation='vertical', rwidth=None, log=False, color=None, label=None, hold=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
Expand Down
8 changes: 7 additions & 1 deletion lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ def validate_font_properties(s):
'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'b10',
], ignorecase=True)

validate_hist_histtype = ValidateInStrings('histtype',[
'bar', 'barstacked', 'step', 'stepfilled',
], ignorecase=True)

def validate_ps_distiller(s):
if type(s) is str:
s = s.lower()
Expand Down Expand Up @@ -427,7 +431,9 @@ def __call__(self, s):
'image.resample' : [False, validate_bool],

'contour.negative_linestyle' : ['dashed', validate_negative_linestyle_legacy],


'hist.histtype' : ['bar', validate_hist_histtype],

# axes props
'axes.axisbelow' : [False, validate_bool],
'axes.hold' : [True, validate_bool],
Expand Down
0