|
10 | 10 | dark mode. The wordmark can be added at the right side or bottom of the visual. |
11 | 11 | """ |
12 | 12 |
|
13 | | -import pygmt |
14 | | - |
15 | | -fig = pygmt.Figure() |
16 | | -fig.pygmtlogo() |
17 | | -fig.show() |
18 | | - |
19 | | -# %% |
20 | | - |
21 | | -fig = pygmt.Figure() |
22 | | -fig.pygmtlogo(theme="dark", box="+ggray20") |
23 | | -fig.show() |
24 | | - |
25 | | -# %% |
26 | | - |
27 | | -fig = pygmt.Figure() |
28 | | -fig.basemap(region=[-5, 5, -5, 5], projection="X10c", frame=[1, "+gtan"]) |
29 | | - |
30 | | -fig.pygmtlogo(position="jTL+o0.2c+w4c", box="+gwhite+p1p,gray") |
31 | | -fig.pygmtlogo(shape="hexagon", position="jTR+o0.2c+w4c") |
32 | | - |
33 | | -fig.pygmtlogo(color=False, wordmark=False, position="jTL+o0.5c/2c+w1.5c", box=False) |
34 | | -fig.pygmtlogo( |
35 | | - color=False, |
36 | | - theme="dark", |
37 | | - shape="hexagon", |
38 | | - wordmark=False, |
39 | | - position="jTR+o0.5c/2c+w1.5c", |
40 | | - box=False, |
41 | | -) |
42 | | -fig.pygmtlogo(wordmark="vertical", position="jMC+w2c", box="+gwhite") |
43 | | - |
44 | | -fig.show() |
45 | | - |
46 | | -# %% |
47 | | -# All combinations |
48 | | - |
49 | | -i_plot = 0 |
50 | | - |
51 | | -fig = pygmt.Figure() |
52 | | - |
53 | | -for color in [True, False]: |
54 | | - for theme in ["light", "dark"]: |
55 | | - for shape in ["circle", "hexagon"]: |
56 | | - for wordmark in [False, True, "horizontal", "vertical"]: |
57 | | - for box in [False, True]: |
58 | | - if not box: |
59 | | - box_used = False |
60 | | - elif box: |
61 | | - if theme == "light": |
62 | | - box_used = "+gwhite" |
63 | | - elif theme == "dark": |
64 | | - box_used = "+ggray20" |
65 | | - # fig = pygmt.Figure() |
66 | | - fig.basemap( |
67 | | - region=[-1, 1, -1, 1], projection="X2.5c/3.5c", frame="+gtan" |
68 | | - ) |
69 | | - # fig.image("@needle.png", position="jMC+w2c", box=box_used) |
70 | | - fig.pygmtlogo( |
71 | | - color=color, |
72 | | - theme=theme, |
73 | | - shape=shape, |
74 | | - wordmark=wordmark, |
75 | | - position="jMC+w2c", |
76 | | - box=box_used, |
77 | | - ) |
78 | | - |
79 | | - fig.shift_origin(xshift="+w+0.5c") |
80 | | - n_hor = 8 |
81 | | - if i_plot in range(n_hor - 1, 100, n_hor): |
82 | | - fig.shift_origin( |
83 | | - xshift=f"-{(n_hor * 2.5 + n_hor * 0.5)}c", |
84 | | - yshift="-h-0.5c", |
85 | | - ) # n_hor*width + n_hor*xshift |
86 | | - |
87 | | - i_plot = i_plot + 1 |
88 | | -fig.show() |
89 | | - |
90 | | - |
91 | 13 | # %% |
92 | 14 | # All versions |
93 | 15 | # modified from |
|
157 | 79 | fig.show(width=1000) |
158 | 80 |
|
159 | 81 |
|
160 | | -# sphinx_gallery_thumbnail_number = 3 |
| 82 | +# sphinx_gallery_thumbnail_number = 1 |
0 commit comments