Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Date stem simplefix #3015

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 2 commits into from
May 16, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
2014-04-27 Improved input clean up in Axes.{h|v}lines
Coerce input into a 1D ndarrays (after dealing with units).

2014-04-27 removed un-needed cast to float in stem

2014-04-22 Added an example showing the difference between
interpolation = 'none' and interpolation = 'nearest' in
`imshow()` when saving vector graphics files.
Expand All @@ -18,6 +20,10 @@
2014-04-08 Fixed a bug in parasite_axes.py by making a list out
of a generator at line 263.

2014-02-25 In backend_qt4agg changed from using update -> repaint under
windows. See comment in source near `self._priv_update` for
longer explaination.

2014-03-27 Added tests for pie ccw parameter. Removed pdf and svg images
from tests for pie linewidth parameter.

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2263,7 +2263,7 @@ def stem(self, *args, **kwargs):
self.hold(True)

# Assume there's at least one data array
y = np.asarray(args[0], dtype=np.float)
y = np.asarray(args[0])
args = args[1:]

# Try a second one
Expand Down
13 changes: 13 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,6 +1636,19 @@ def test_stem_args():
ax.stem(x, y, 'r--', basefmt='b--')


@cleanup
def test_stem_dates():
fig, ax = plt.subplots(1, 1)
from dateutil import parser
x = parser.parse("2013-9-28 11:00:00")
y = 100

x1 = parser.parse("2013-9-28 12:00:00")
y1 = 200

ax.stem([x, x1], [y, y1], "*-")


@image_comparison(baseline_images=['hist_stacked_stepfilled_alpha'])
def test_hist_stacked_stepfilled_alpha():
# make some data
Expand Down