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

Commit a4e32ee

Browse filesBrowse files
author
shawnchen
committed
modify the gallery example of colorbar
1 parent d1e6266 commit a4e32ee
Copy full SHA for a4e32ee

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

‎examples/color/colorbar_basics.py

Copy file name to clipboardExpand all lines: examples/color/colorbar_basics.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@
3232
fig.colorbar(pos, ax=ax1)
3333

3434
# repeat everything above for the negative data
35+
# you can specifiy location, anchor and shrink the colorbar
3536
neg = ax2.imshow(Zneg, cmap='Reds_r', interpolation='none')
36-
fig.colorbar(neg, ax=ax2)
37+
fig.colorbar(neg, ax=ax2, location='right', anchor=(0,0.3), shrink=0.7)
3738

3839
# Plot both positive and negative values between +/- 1.2
3940
pos_neg_clipped = ax3.imshow(Z, cmap='RdBu', vmin=-1.2, vmax=1.2,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.