Skip to content

Plot Colorbar in axes_grid1 with pcolormesh #630

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 1 commit into from
Jan 1, 2012
Merged
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
use pcolormesh instead of pcolor in axes_grid1 colorbar
This is identical to the standard colorbar and removes artifacts
in the pdf version of the plot.
  • Loading branch information
jenshnielsen committed Dec 16, 2011
commit a62545d8ff0b9c7f7c73cd93dc37f4a865c70809
5 changes: 2 additions & 3 deletions lib/mpl_toolkits/axes_grid1/colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,8 @@ def _add_solids(self, X, Y, C):
del self.solids
del self.dividers

col = self.ax.pcolor(*args, **kw)
col.set_antialiased(False) # This is to suppress artifacts. We
# may use pcolormesh instead.
col = self.ax.pcolormesh(*args, **kw)

self.solids = col
if self.drawedges:
self.dividers = collections.LineCollection(self._edges(X,Y),
Expand Down