| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,21 +5,18 @@ | |||
| 5 | 5 | ||
| 6 | 6 | Demonstration of using norm to map colormaps onto data in non-linear ways. | |
| 7 | 7 | ||
| 8 | + Here we plot data that has two humps, one negative and one positive. | ||
| 9 | + The positive humpy has 5-times the amplitude of the negative. | ||
| 10 | + With a linear scale you cannot see detail in the negative hump. | ||
| 11 | + So we logarithmically scale the positive and negative data separately. | ||
| 12 | + | ||
| 8 | 13 | .. redirect-from:: /gallery/userdemo/colormap_normalization_symlognorm | |
| 9 | 14 | """ | |
| 10 | 15 | ||
| 11 | 16 | import numpy as np | |
| 12 | 17 | import matplotlib.pyplot as plt | |
| 13 | 18 | import matplotlib.colors as colors | |
| 14 | 19 | ||
| 15 | - """ | ||
| 16 | - SymLogNorm: two humps, one negative and one positive, The positive | ||
| 17 | - with 5-times the amplitude. Linearly, you cannot see detail in the | ||
| 18 | - negative hump. Here we logarithmically scale the positive and | ||
| 19 | - negative data separately. | ||
| 20 | - | ||
| 21 | - Note that colorbar labels do not come out looking very good. | ||
| 22 | - """ | ||
| 23 | 20 | ||
| 24 | 21 | N = 100 | |
| 25 | 22 | X, Y = np.mgrid[-3:3:complex(0, N), -2:2:complex(0, N)] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -989,12 +989,10 @@ def trigger(self, *args, **kwargs): | |||
| 989 | 989 | 'help': ToolHelpBase, | |
| 990 | 990 | 'copy': ToolCopyToClipboardBase, | |
| 991 | 991 | } | |
| 992 | - """Default tools""" | ||
| 993 | 992 | ||
| 994 | 993 | default_toolbar_tools = [['navigation', ['home', 'back', 'forward']], | |
| 995 | 994 | ['zoompan', ['pan', 'zoom', 'subplots']], | |
| 996 | 995 | ['io', ['save', 'help']]] | |
| 997 | - """Default tools in the toolbar""" | ||
| 998 | 996 | ||
| 999 | 997 | ||
| 1000 | 998 | def add_tools_to_manager(toolmanager, tools=default_tools): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -210,9 +210,8 @@ def _get_rc_timezone(): | |||
| 210 | 210 | return dateutil.tz.gettz(s) | |
| 211 | 211 | ||
| 212 | 212 | ||
| 213 | - """ | ||
| 214 | - Time-related constants. | ||
| 215 | - """ | ||
| 213 | + # Time-related constants. | ||
| 214 | + | ||
| 216 | 215 | EPOCH_OFFSET = float(datetime.datetime(1970, 1, 1).toordinal()) | |
| 217 | 216 | # EPOCH_OFFSET is not used by matplotlib | |
| 218 | 217 | JULIAN_OFFSET = 1721424.5 # Julian date at 0000-12-31 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments