|
16 | 16 | horizontal (**L**\ eft, **C**\ enter, **R**\ ight) alignment codes, e.g.
|
17 | 17 | ``position="jTR"`` for Top Right.
|
18 | 18 | - **g**: using map coordinates, e.g. ``position="g170/-45"`` for longitude
|
19 |
| - 170E, latitude 45S. |
| 19 | + 170° East, latitude 45° South. |
20 | 20 | - **x**: using paper coordinates, e.g. ``position="x5c/7c"`` for 5 cm, 7 cm
|
21 | 21 | from anchor point.
|
22 | 22 | - **n**: using normalized (0-1) coordinates, e.g. ``position="n0.4/0.8"``.
|
23 | 23 |
|
24 | 24 | Note that the anchor point defaults to the bottom left (**BL**). Append ``+h``
|
25 |
| -to ``position`` to get a horizontal colorbar instead of a vertical one |
26 |
| -(``+v``). |
| 25 | +to ``position`` to get a horizontal colorbar instead of a vertical one (``+v``). |
27 | 26 | """
|
28 | 27 |
|
29 | 28 | # %%
|
|
34 | 33 |
|
35 | 34 | # ============
|
36 | 35 | # Create a colorbar designed for seismic tomography - roma
|
37 |
| -# Colorbar is placed at bottom center (BC) by default if no position is given |
| 36 | +# Colorbar is placed at Bottom Center (BC) by default if no position is given |
38 | 37 | # Add quantity and unit as labels ("+l") to the x and y axes
|
39 | 38 | # Add annotations ("+a") in steps of 0.5 and ticks ("+f") in steps of 0.1
|
40 | 39 | fig.colorbar(cmap="roma", frame=["xa0.5f0.1+lVelocity", "y+lm/s"])
|
|
78 | 77 | # Plot the colorbar
|
79 | 78 | fig.colorbar(
|
80 | 79 | cmap=True, # Use colormap set up above
|
81 |
| - # Colorbar placed inside the plot bounding box (j) at Bottom Left (BL), |
82 |
| - # offset (+o) by 0.5 cm horizontally and 0.8 cm vertically from anchor |
| 80 | + # Colorbar placed inside the plot bounding box (j) in the Bottom Left (BL) corner, |
| 81 | + # with an offset (+o) by 0.5 cm horizontally and 0.8 cm vertically from the anchor |
83 | 82 | # point, and plotted horizontally (+h)
|
84 | 83 | position="jBL+o0.5c/0.8c+h",
|
85 | 84 | box=True,
|
|
0 commit comments