Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Issue #1763 #1775

Merged
merged 2 commits into from

2 participants

@tacaswell
Owner

The bottom kwarg was ignored by all types but stackedbar.

Includes unit test

tacaswell added some commits
@tacaswell tacaswell added test of 'bottom' kwarg in `hist` bad7d24
@tacaswell tacaswell fix of issue #1763
The `bottom` that needs to be passed to bar or barh got lost kwarg got
lost in the histogram refactoring.
6fdc336
@tacaswell
Owner

ping for github linage, fixes #1763

@mdboom mdboom merged commit d99bb88 into matplotlib:v1.2.x
@tacaswell tacaswell deleted the tacaswell:issue_1763 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 22, 2013
  1. @tacaswell
  2. @tacaswell

    fix of issue #1763

    tacaswell authored
    The `bottom` that needs to be passed to bar or barh got lost kwarg got
    lost in the histogram refactoring.
This page is out of date. Refresh to see the latest.
View
6 lib/matplotlib/axes.py
@@ -8108,7 +8108,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
hist_kwargs['new'] = True
n = []
- mlast = bottom
+ mlast = None
# reversed order is necessary so when stacking histogram, first dataset is on top
# if histogram isn't stacked, this doesn't make any difference
for i in reversed(xrange(nx)):
@@ -8125,6 +8125,8 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
mlast[:] = m
n.append(m)
+
+
if cumulative:
slc = slice(None)
if cbook.is_numlike(cumulative) and cumulative < 0:
@@ -8175,7 +8177,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
for m, c in zip(n, color):
patch = _barfunc(bins[:-1]+boffset, m, width,
align='center', log=log,
- color=c)
+ color=c, bottom=bottom)
patches.append(patch)
boffset += dw
View
BIN  lib/matplotlib/tests/baseline_images/test_axes/hist_offset.pdf
Binary file not shown
View
BIN  lib/matplotlib/tests/baseline_images/test_axes/hist_offset.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
671 lib/matplotlib/tests/baseline_images/test_axes/hist_offset.svg
@@ -0,0 +1,671 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Created with matplotlib (http://matplotlib.org/) -->
+<svg height="432pt" version="1.1" viewBox="0 0 576 432" width="576pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <style type="text/css">
+*{stroke-linecap:square;stroke-linejoin:round;}
+ </style>
+ </defs>
+ <g id="figure_1">
+ <g id="patch_1">
+ <path d="
+M0 432
+L576 432
+L576 0
+L0 0
+z
+" style="fill:#ffffff;"/>
+ </g>
+ <g id="axes_1">
+ <g id="patch_2">
+ <path d="
+M72 388.8
+L518.4 388.8
+L518.4 43.2
+L72 43.2
+z
+" style="fill:#ffffff;"/>
+ </g>
+ <g id="patch_3">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M72 364.114
+L116.64 364.114
+L116.64 240.686
+L72 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_4">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M116.64 364.114
+L161.28 364.114
+L161.28 240.686
+L116.64 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_5">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M161.28 364.114
+L205.92 364.114
+L205.92 240.686
+L161.28 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_6">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M205.92 364.114
+L250.56 364.114
+L250.56 240.686
+L205.92 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_7">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M250.56 364.114
+L295.2 364.114
+L295.2 240.686
+L250.56 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_8">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M295.2 364.114
+L339.84 364.114
+L339.84 240.686
+L295.2 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_9">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M339.84 364.114
+L384.48 364.114
+L384.48 240.686
+L339.84 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_10">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M384.48 364.114
+L429.12 364.114
+L429.12 240.686
+L384.48 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_11">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M429.12 364.114
+L473.76 364.114
+L473.76 240.686
+L429.12 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_12">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M473.76 364.114
+L518.4 364.114
+L518.4 240.686
+L473.76 240.686
+z
+" style="fill:#0000ff;stroke:#000000;"/>
+ </g>
+ <g id="patch_13">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M116.64 117.257
+L125.568 117.257
+L125.568 67.8857
+L116.64 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="patch_14">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M125.568 117.257
+L134.496 117.257
+L134.496 67.8857
+L125.568 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="patch_15">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M134.496 117.257
+L143.424 117.257
+L143.424 67.8857
+L134.496 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="patch_16">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M143.424 117.257
+L152.352 117.257
+L152.352 67.8857
+L143.424 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="patch_17">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M152.352 117.257
+L161.28 117.257
+L161.28 67.8857
+L152.352 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="patch_18">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M161.28 117.257
+L170.208 117.257
+L170.208 67.8857
+L161.28 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="patch_19">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M170.208 117.257
+L179.136 117.257
+L179.136 67.8857
+L170.208 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="patch_20">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M179.136 117.257
+L188.064 117.257
+L188.064 67.8857
+L179.136 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="patch_21">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M188.064 117.257
+L196.992 117.257
+L196.992 67.8857
+L188.064 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="patch_22">
+ <path clip-path="url(#p7ff5b81e1d)" d="
+M196.992 117.257
+L205.92 117.257
+L205.92 67.8857
+L196.992 67.8857
+z
+" style="fill:#008000;stroke:#000000;"/>
+ </g>
+ <g id="matplotlib.axis_1">
+ <g id="xtick_1">
+ <g id="line2d_1">
+ <defs>
+ <path d="
+M0 0
+L0 -4" id="mcb557df647" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
+ </defs>
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mcb557df647" y="388.8"/>
+ </g>
+ </g>
+ <g id="line2d_2">
+ <defs>
+ <path d="
+M0 0
+L0 4" id="mdad270ee8e" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
+ </defs>
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mdad270ee8e" y="43.2"/>
+ </g>
+ </g>
+ <g id="text_1">
+ <!-- 0 -->
+ <defs>
+ <path d="
+M31.7812 66.4062
+Q24.1719 66.4062 20.3281 58.9062
+Q16.5 51.4219 16.5 36.375
+Q16.5 21.3906 20.3281 13.8906
+Q24.1719 6.39062 31.7812 6.39062
+Q39.4531 6.39062 43.2812 13.8906
+Q47.125 21.3906 47.125 36.375
+Q47.125 51.4219 43.2812 58.9062
+Q39.4531 66.4062 31.7812 66.4062
+M31.7812 74.2188
+Q44.0469 74.2188 50.5156 64.5156
+Q56.9844 54.8281 56.9844 36.375
+Q56.9844 17.9688 50.5156 8.26562
+Q44.0469 -1.42188 31.7812 -1.42188
+Q19.5312 -1.42188 13.0625 8.26562
+Q6.59375 17.9688 6.59375 36.375
+Q6.59375 54.8281 13.0625 64.5156
+Q19.5312 74.2188 31.7812 74.2188" id="BitstreamVeraSans-Roman-30"/>
+ </defs>
+ <g transform="translate(68.9765625 401.70625)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-30"/>
+ </g>
+ </g>
+ </g>
+ <g id="xtick_2">
+ <g id="line2d_3">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="161.28" xlink:href="#mcb557df647" y="388.8"/>
+ </g>
+ </g>
+ <g id="line2d_4">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="161.28" xlink:href="#mdad270ee8e" y="43.2"/>
+ </g>
+ </g>
+ <g id="text_2">
+ <!-- 2 -->
+ <defs>
+ <path d="
+M19.1875 8.29688
+L53.6094 8.29688
+L53.6094 0
+L7.32812 0
+L7.32812 8.29688
+Q12.9375 14.1094 22.625 23.8906
+Q32.3281 33.6875 34.8125 36.5312
+Q39.5469 41.8438 41.4219 45.5312
+Q43.3125 49.2188 43.3125 52.7812
+Q43.3125 58.5938 39.2344 62.25
+Q35.1562 65.9219 28.6094 65.9219
+Q23.9688 65.9219 18.8125 64.3125
+Q13.6719 62.7031 7.8125 59.4219
+L7.8125 69.3906
+Q13.7656 71.7812 18.9375 73
+Q24.125 74.2188 28.4219 74.2188
+Q39.75 74.2188 46.4844 68.5469
+Q53.2188 62.8906 53.2188 53.4219
+Q53.2188 48.9219 51.5312 44.8906
+Q49.8594 40.875 45.4062 35.4062
+Q44.1875 33.9844 37.6406 27.2188
+Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
+ </defs>
+ <g transform="translate(158.503125 401.70625)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-32"/>
+ </g>
+ </g>
+ </g>
+ <g id="xtick_3">
+ <g id="line2d_5">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="250.56" xlink:href="#mcb557df647" y="388.8"/>
+ </g>
+ </g>
+ <g id="line2d_6">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="250.56" xlink:href="#mdad270ee8e" y="43.2"/>
+ </g>
+ </g>
+ <g id="text_3">
+ <!-- 4 -->
+ <defs>
+ <path d="
+M37.7969 64.3125
+L12.8906 25.3906
+L37.7969 25.3906
+z
+
+M35.2031 72.9062
+L47.6094 72.9062
+L47.6094 25.3906
+L58.0156 25.3906
+L58.0156 17.1875
+L47.6094 17.1875
+L47.6094 0
+L37.7969 0
+L37.7969 17.1875
+L4.89062 17.1875
+L4.89062 26.7031
+z
+" id="BitstreamVeraSans-Roman-34"/>
+ </defs>
+ <g transform="translate(247.3725 401.54875)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-34"/>
+ </g>
+ </g>
+ </g>
+ <g id="xtick_4">
+ <g id="line2d_7">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="339.84" xlink:href="#mcb557df647" y="388.8"/>
+ </g>
+ </g>
+ <g id="line2d_8">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="339.84" xlink:href="#mdad270ee8e" y="43.2"/>
+ </g>
+ </g>
+ <g id="text_4">
+ <!-- 6 -->
+ <defs>
+ <path d="
+M33.0156 40.375
+Q26.375 40.375 22.4844 35.8281
+Q18.6094 31.2969 18.6094 23.3906
+Q18.6094 15.5312 22.4844 10.9531
+Q26.375 6.39062 33.0156 6.39062
+Q39.6562 6.39062 43.5312 10.9531
+Q47.4062 15.5312 47.4062 23.3906
+Q47.4062 31.2969 43.5312 35.8281
+Q39.6562 40.375 33.0156 40.375
+M52.5938 71.2969
+L52.5938 62.3125
+Q48.875 64.0625 45.0938 64.9844
+Q41.3125 65.9219 37.5938 65.9219
+Q27.8281 65.9219 22.6719 59.3281
+Q17.5312 52.7344 16.7969 39.4062
+Q19.6719 43.6562 24.0156 45.9219
+Q28.375 48.1875 33.5938 48.1875
+Q44.5781 48.1875 50.9531 41.5156
+Q57.3281 34.8594 57.3281 23.3906
+Q57.3281 12.1562 50.6875 5.35938
+Q44.0469 -1.42188 33.0156 -1.42188
+Q20.3594 -1.42188 13.6719 8.26562
+Q6.98438 17.9688 6.98438 36.375
+Q6.98438 53.6562 15.1875 63.9375
+Q23.3906 74.2188 37.2031 74.2188
+Q40.9219 74.2188 44.7031 73.4844
+Q48.4844 72.75 52.5938 71.2969" id="BitstreamVeraSans-Roman-36"/>
+ </defs>
+ <g transform="translate(336.819375 401.70625)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-36"/>
+ </g>
+ </g>
+ </g>
+ <g id="xtick_5">
+ <g id="line2d_9">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="429.12" xlink:href="#mcb557df647" y="388.8"/>
+ </g>
+ </g>
+ <g id="line2d_10">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="429.12" xlink:href="#mdad270ee8e" y="43.2"/>
+ </g>
+ </g>
+ <g id="text_5">
+ <!-- 8 -->
+ <defs>
+ <path d="
+M31.7812 34.625
+Q24.75 34.625 20.7188 30.8594
+Q16.7031 27.0938 16.7031 20.5156
+Q16.7031 13.9219 20.7188 10.1562
+Q24.75 6.39062 31.7812 6.39062
+Q38.8125 6.39062 42.8594 10.1719
+Q46.9219 13.9688 46.9219 20.5156
+Q46.9219 27.0938 42.8906 30.8594
+Q38.875 34.625 31.7812 34.625
+M21.9219 38.8125
+Q15.5781 40.375 12.0312 44.7188
+Q8.5 49.0781 8.5 55.3281
+Q8.5 64.0625 14.7188 69.1406
+Q20.9531 74.2188 31.7812 74.2188
+Q42.6719 74.2188 48.875 69.1406
+Q55.0781 64.0625 55.0781 55.3281
+Q55.0781 49.0781 51.5312 44.7188
+Q48 40.375 41.7031 38.8125
+Q48.8281 37.1562 52.7969 32.3125
+Q56.7812 27.4844 56.7812 20.5156
+Q56.7812 9.90625 50.3125 4.23438
+Q43.8438 -1.42188 31.7812 -1.42188
+Q19.7344 -1.42188 13.25 4.23438
+Q6.78125 9.90625 6.78125 20.5156
+Q6.78125 27.4844 10.7812 32.3125
+Q14.7969 37.1562 21.9219 38.8125
+M18.3125 54.3906
+Q18.3125 48.7344 21.8438 45.5625
+Q25.3906 42.3906 31.7812 42.3906
+Q38.1406 42.3906 41.7188 45.5625
+Q45.3125 48.7344 45.3125 54.3906
+Q45.3125 60.0625 41.7188 63.2344
+Q38.1406 66.4062 31.7812 66.4062
+Q25.3906 66.4062 21.8438 63.2344
+Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
+ </defs>
+ <g transform="translate(426.12 401.70625)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-38"/>
+ </g>
+ </g>
+ </g>
+ <g id="xtick_6">
+ <g id="line2d_11">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#mcb557df647" y="388.8"/>
+ </g>
+ </g>
+ <g id="line2d_12">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#mdad270ee8e" y="43.2"/>
+ </g>
+ </g>
+ <g id="text_6">
+ <!-- 10 -->
+ <defs>
+ <path d="
+M12.4062 8.29688
+L28.5156 8.29688
+L28.5156 63.9219
+L10.9844 60.4062
+L10.9844 69.3906
+L28.4219 72.9062
+L38.2812 72.9062
+L38.2812 8.29688
+L54.3906 8.29688
+L54.3906 0
+L12.4062 0
+z
+" id="BitstreamVeraSans-Roman-31"/>
+ </defs>
+ <g transform="translate(511.8225 401.70625)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
+ <use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-30"/>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g id="matplotlib.axis_2">
+ <g id="ytick_1">
+ <g id="line2d_13">
+ <defs>
+ <path d="
+M0 0
+L4 0" id="mc8fcea1516" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
+ </defs>
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="388.8"/>
+ </g>
+ </g>
+ <g id="line2d_14">
+ <defs>
+ <path d="
+M0 0
+L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/>
+ </defs>
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="388.8"/>
+ </g>
+ </g>
+ <g id="text_7">
+ <!-- 4 -->
+ <g transform="translate(61.625 393.174375)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-34"/>
+ </g>
+ </g>
+ </g>
+ <g id="ytick_2">
+ <g id="line2d_15">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="339.428571429"/>
+ </g>
+ </g>
+ <g id="line2d_16">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="339.428571429"/>
+ </g>
+ </g>
+ <g id="text_8">
+ <!-- 6 -->
+ <g transform="translate(61.95875 343.796383929)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-36"/>
+ </g>
+ </g>
+ </g>
+ <g id="ytick_3">
+ <g id="line2d_17">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="290.057142857"/>
+ </g>
+ </g>
+ <g id="line2d_18">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="290.057142857"/>
+ </g>
+ </g>
+ <g id="text_9">
+ <!-- 8 -->
+ <g transform="translate(62.0 294.424955357)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-38"/>
+ </g>
+ </g>
+ </g>
+ <g id="ytick_4">
+ <g id="line2d_19">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="240.685714286"/>
+ </g>
+ </g>
+ <g id="line2d_20">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="240.685714286"/>
+ </g>
+ </g>
+ <g id="text_10">
+ <!-- 10 -->
+ <g transform="translate(54.845 245.053526786)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
+ <use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-30"/>
+ </g>
+ </g>
+ </g>
+ <g id="ytick_5">
+ <g id="line2d_21">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="191.314285714"/>
+ </g>
+ </g>
+ <g id="line2d_22">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="191.314285714"/>
+ </g>
+ </g>
+ <g id="text_11">
+ <!-- 12 -->
+ <g transform="translate(55.25 195.767410714)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
+ <use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-32"/>
+ </g>
+ </g>
+ </g>
+ <g id="ytick_6">
+ <g id="line2d_23">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="141.942857143"/>
+ </g>
+ </g>
+ <g id="line2d_24">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="141.942857143"/>
+ </g>
+ </g>
+ <g id="text_12">
+ <!-- 14 -->
+ <g transform="translate(54.72125 146.317232143)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
+ <use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-34"/>
+ </g>
+ </g>
+ </g>
+ <g id="ytick_7">
+ <g id="line2d_25">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="92.5714285714"/>
+ </g>
+ </g>
+ <g id="line2d_26">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="92.5714285714"/>
+ </g>
+ </g>
+ <g id="text_13">
+ <!-- 16 -->
+ <g transform="translate(54.80375 96.9392410714)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
+ <use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-36"/>
+ </g>
+ </g>
+ </g>
+ <g id="ytick_8">
+ <g id="line2d_27">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="72.0" xlink:href="#mc8fcea1516" y="43.2"/>
+ </g>
+ </g>
+ <g id="line2d_28">
+ <g>
+ <use style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;" x="518.4" xlink:href="#m0d5b0a6425" y="43.2"/>
+ </g>
+ </g>
+ <g id="text_14">
+ <!-- 18 -->
+ <g transform="translate(54.869375 47.5678125)scale(0.12 -0.12)">
+ <use xlink:href="#BitstreamVeraSans-Roman-31"/>
+ <use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-38"/>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g id="patch_23">
+ <path d="
+M72 43.2
+L518.4 43.2" style="fill:none;stroke:#000000;"/>
+ </g>
+ <g id="patch_24">
+ <path d="
+M518.4 388.8
+L518.4 43.2" style="fill:none;stroke:#000000;"/>
+ </g>
+ <g id="patch_25">
+ <path d="
+M72 388.8
+L518.4 388.8" style="fill:none;stroke:#000000;"/>
+ </g>
+ <g id="patch_26">
+ <path d="
+M72 388.8
+L72 43.2" style="fill:none;stroke:#000000;"/>
+ </g>
+ </g>
+ </g>
+ <defs>
+ <clipPath id="p7ff5b81e1d">
+ <rect height="345.6" width="446.4" x="72.0" y="43.2"/>
+ </clipPath>
+ </defs>
+</svg>
View
12 lib/matplotlib/tests/test_axes.py
@@ -945,6 +945,18 @@ def test_hist_stacked():
ax = fig.add_subplot(111)
ax.hist( (d1, d2), histtype="stepfilled", stacked=True)
+
+@image_comparison(baseline_images=['hist_offset'])
+def test_hist_offset():
+ # make some data
+ d1 = np.linspace(0, 10, 50)
+ d2 = np.linspace(1, 3, 20)
+ fig = plt.figure()
+ ax = fig.add_subplot(111)
+ ax.hist(d1, bottom=5)
+ ax.hist(d2, bottom=15)
+
+
@image_comparison(baseline_images=['hist_stacked_weights'])
def test_hist_stacked_weighted():
# make some data
Something went wrong with that request. Please try again.