Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

hexbin log scale is broken in matplotlib 1.2.0 #1636

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 3 commits into from
Jan 4, 2013
Merged
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
PEP8 fixes.
  • Loading branch information
mdboom committed Jan 4, 2013
commit f1450f34f91b5e841574765a17b086c051a1bd89
20 changes: 10 additions & 10 deletions 20 lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5443,7 +5443,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
lines_kw['transform'] = kwargs['transform']
if 'zorder' in kwargs:
lines_kw['zorder'] = kwargs['zorder']

# arrays fine here, they are booleans and hence not units
if not iterable(lolims):
lolims = np.asarray([lolims]*len(x), bool)
Expand Down Expand Up @@ -6442,28 +6442,28 @@ def hexbin(self, x, y, C = None, gridsize = 100, bins = None,
if xscale == 'log' or yscale == 'log':
polygons = np.expand_dims(polygon, 0) + np.expand_dims(offsets, 1)
if xscale == 'log':
polygons[:,:,0] = 10.0 ** polygons[:,:,0]
polygons[:, :, 0] = 10.0 ** polygons[:, :, 0]
xmin = 10.0 ** xmin
xmax = 10.0 ** xmax
self.set_xscale(xscale)
if yscale == 'log':
polygons[:,:,1] = 10.0 ** polygons[:,:,1]
polygons[:, :, 1] = 10.0 ** polygons[:, :, 1]
ymin = 10.0 ** ymin
ymax = 10.0 ** ymax
self.set_yscale(yscale)
collection = mcoll.PolyCollection(
polygons,
edgecolors = edgecolors,
linewidths = linewidths,
edgecolors=edgecolors,
linewidths=linewidths,
)
else:
collection = mcoll.PolyCollection(
[polygon],
edgecolors = edgecolors,
linewidths = linewidths,
offsets = offsets,
transOffset = mtransforms.IdentityTransform(),
offset_position = "data"
edgecolors=edgecolors,
linewidths=linewidths,
offsets=offsets,
transOffset=mtransforms.IdentityTransform(),
offset_position="data"
)

if isinstance(norm, mcolors.LogNorm):
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def test_hexbin_log():
y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n)
y = np.power(2, y * 0.5)
ax = fig.add_subplot(111)
plt.hexbin(x,y,yscale='log')
ax.hexbin(x, y, yscale='log')

@cleanup
def test_inverted_limits():
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.