File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 99# or Generic Mapping Tools
1010# (http://gmt.soest.hawaii.edu/gmt/doc/gmt/html/GMT_Docs/node145.html)
1111
12+
1213def main ():
1314 # Test data
1415 x , y = np .mgrid [- 5 :5 :0.05 , - 5 :5 :0.05 ]
@@ -26,6 +27,7 @@ def main():
2627
2728 plt .show ()
2829
30+
2931def compare (z , cmap , ve = 1 ):
3032 # Create subplots and hide ticks
3133 fig , axes = plt .subplots (ncols = 2 , nrows = 2 )
Original file line number Diff line number Diff line change 55import matplotlib .pyplot as plt
66from matplotlib .colors import LightSource , Normalize
77
8+
89def display_colorbar ():
910 """Display a correct numeric colorbar for a shaded plot."""
1011 y , x = np .mgrid [- 4 :2 :200j , - 4 :2 :200j ]
@@ -24,6 +25,7 @@ def display_colorbar():
2425
2526 ax .set_title ('Using a colorbar with a shaded plot' , size = 'x-large' )
2627
28+
2729def avoid_outliers ():
2830 """Use a custom norm to control the displayed z-range of a shaded plot."""
2931 y , x = np .mgrid [- 4 :2 :200j , - 4 :2 :200j ]
@@ -46,6 +48,7 @@ def avoid_outliers():
4648
4749 fig .suptitle ('Avoiding Outliers in Shaded Plots' , size = 'x-large' )
4850
51+
4952def shade_other_data ():
5053 """Demonstrates displaying different variables through shade and color."""
5154 y , x = np .mgrid [- 4 :2 :200j , - 4 :2 :200j ]
You can’t perform that action at this time.
0 commit comments