-
Notifications
You must be signed in to change notification settings - Fork 228
POC: Code PyGMT logo in PyGMT #3849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
yvonnefroehlich
wants to merge
185
commits into
main
Choose a base branch
from
code-pygmt-logo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 13 commits
Commits
Show all changes
185 commits
Select commit
Hold shift + click to select a range
2a319b7
Add first version of PyGMT code for PyGMT logo
yvonnefroehlich c4e683f
Remove execution permission
yvonnefroehlich 0eb9044
Adjust tumbnail image
yvonnefroehlich 4d2cc0e
Introduce input variable for adding wordmark and adjusting the orient…
yvonnefroehlich 7c10e4a
Fix URL link
yvonnefroehlich 135c4dc
Adjust saving (temp)
yvonnefroehlich 8c6df7a
Adjust frame config
yvonnefroehlich 11f230f
Remove execution permission
yvonnefroehlich dfd018a
Adjust length of diagonal lines
yvonnefroehlich a9e0503
Use corner for yellow line at right side of letter M
yvonnefroehlich c1679b3
Remove execution permission
yvonnefroehlich 58cad71
Add space between horizontal line of letter G and letter M
yvonnefroehlich eb9c317
Add comment for distance between letters M and G
yvonnefroehlich 5cc808e
Reduce white margin
yvonnefroehlich cdadee3
Remove execution permission
yvonnefroehlich 6b91061
Add transparent option
yvonnefroehlich 6a2e785
Remove execution permission
yvonnefroehlich 9bbf443
Adjust yellow line ending at the right side of letter M
yvonnefroehlich 945183b
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich 0aea0b0
Make clean border of shape
yvonnefroehlich 80b9a48
Remove execution permission
yvonnefroehlich 591f724
Subpress temporary show | Add frame 0
yvonnefroehlich c75397d
Remove execution permission
yvonnefroehlich 1fbb090
Introduce box parameter
yvonnefroehlich b1d373a
Fix code style | Improve box querry
yvonnefroehlich 39e5ba1
Remove execution permission
yvonnefroehlich 8519275
Update variable name
yvonnefroehlich 71185ee
Remove execution permission
yvonnefroehlich 57d91bd
Convert to function
yvonnefroehlich 93c9f05
Fix code style and add examples
yvonnefroehlich 7cfea09
Code formating
yvonnefroehlich e9d1798
Remove execution permission
yvonnefroehlich dab45b9
Update examples
yvonnefroehlich 67b13be
Remove execution permission
yvonnefroehlich 0fe36d3
Remove withe margin |Use box parameter of Figure.image
yvonnefroehlich 5e19702
Follow coding style
yvonnefroehlich 1d07537
Remove execution permission
yvonnefroehlich 432d6cf
Minor updates | add examples
yvonnefroehlich 725126d
Remove execution permission
yvonnefroehlich 361e3aa
Remove unneeded docs
yvonnefroehlich 9c9d19f
Remove unneeded parameters from examples
yvonnefroehlich 9f1e812
Remove execution permission
yvonnefroehlich 789d82e
Improve names of parameters
yvonnefroehlich b38edf9
Remove execution permission
yvonnefroehlich c8c7f79
Update parameter list explanaition
yvonnefroehlich ff04635
Remove execusion permission
yvonnefroehlich 32c5341
Fix typo
yvonnefroehlich b079fd9
Fix rst syntax
yvonnefroehlich 90a2890
Use variables for colors
yvonnefroehlich 4c6013e
Introduce transpareny for wordmark
yvonnefroehlich f8ac7c0
Follow code style
yvonnefroehlich bdb6f14
Adjustments for tranparency for wordmark
yvonnefroehlich 7416979
Remove execution permission
yvonnefroehlich ebdf4f2
Adjust example
yvonnefroehlich 6d01ec1
Remove execution permission
yvonnefroehlich a60a88c
Add comment as reminder
yvonnefroehlich ec4583c
Remove execution permission
yvonnefroehlich 4891de2
Combine box and bg_transparent to box parameter of Figure.image
yvonnefroehlich e3da0ce
Simplify code
yvonnefroehlich 78872b4
Adjust outline
yvonnefroehlich 470ed44
Try to use GMT color setting for font
yvonnefroehlich e77dde2
Remove unneeded code
yvonnefroehlich 126a574
Remove execution permission
yvonnefroehlich 5de8969
Polish code
yvonnefroehlich 77c12f8
Follow code style
yvonnefroehlich 76e1dac
Remove execution permission
yvonnefroehlich 366970a
Use specific variable names
yvonnefroehlich 43d6d92
Remove execution permission
yvonnefroehlich e401fea
Do rotation directly not eps export
yvonnefroehlich cbe6035
Remove execution permission
yvonnefroehlich e060bc7
Make full transparent
yvonnefroehlich d46d5e0
Use dicts
yvonnefroehlich cd38f53
Remove execution permission
yvonnefroehlich e8dd40c
Suppress code style fails because of to many statements PLR0915
yvonnefroehlich 87dd5b7
Remove execution permission
yvonnefroehlich 5f492d7
Add size of logo | add GMT in example | Polish code
yvonnefroehlich b8150a5
Follow code style
yvonnefroehlich 8355de0
Plot yellow lines via loop over list
yvonnefroehlich 7d382b0
Remove execution permission
yvonnefroehlich ff512cc
Plot red lines for letter M via loop over list
yvonnefroehlich c072743
Adjust variable name
yvonnefroehlich 5962954
Use dict
yvonnefroehlich 5175a28
Reduce number of branches to be not > 12
yvonnefroehlich 3768a06
Remove execution permission
yvonnefroehlich 433f8e4
Improve comments
yvonnefroehlich 479f4a2
Remove execution permission
yvonnefroehlich 4f9ae6f
Do not rotate initial basemap -> no need of resize in savefig
yvonnefroehlich 08c7e56
Follow code style
yvonnefroehlich 8cb9079
Remove execution permission
yvonnefroehlich d2f479d
No temp eps file for wordmark
yvonnefroehlich f304d49
Adjust position and font size for wordmark based on orientation
yvonnefroehlich f7a84c5
Follow code style
yvonnefroehlich b18f816
Comment code
yvonnefroehlich 5ff52a8
Remove execution permission
yvonnefroehlich 9297ac5
Adjust position of wordmark
yvonnefroehlich 50e361b
Remove execution permission
yvonnefroehlich 09471e8
Create pygmtlogo.py in src and move code
yvonnefroehlich 0a35459
Update __init__.py
yvonnefroehlich b4259ad
Update figure.py
yvonnefroehlich 06fbfbd
Update gallery exampel
yvonnefroehlich c9c9d75
Add Docstrings
yvonnefroehlich efff204
Fix import in Gallery example
yvonnefroehlich 7779832
Update index
yvonnefroehlich 79500dd
Update gallery example
yvonnefroehlich 7f9d57e
Update imports
yvonnefroehlich 2132e5e
Add tests
yvonnefroehlich 438a100
Follow code style
yvonnefroehlich cb854e3
Update docs
yvonnefroehlich 3d40b6a
Remove exectuion permission
yvonnefroehlich d81c077
Remove exection permission
yvonnefroehlich 2696234
Remove execution permission
yvonnefroehlich c9262cc
Update docstrings
yvonnefroehlich 5999c51
Follow rules for variable names and use no space between consonants
yvonnefroehlich 4121569
Reduce galler example
yvonnefroehlich 16eb3dc
Expand tests
yvonnefroehlich 6d71dc3
Set box default to None
yvonnefroehlich e8c693e
Plot without setting up basemap
yvonnefroehlich dcc38e1
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich 1a2ca98
Add more parameters
yvonnefroehlich d716bd5
Exclude PLR0913
yvonnefroehlich 59dff81
Update tests
yvonnefroehlich d35c445
Use default position=Non
yvonnefroehlich 13306c8
Remove blank line
yvonnefroehlich 78ea05a
Move function create_logo out of function pygmtlogo
yvonnefroehlich 7910e05
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich 6ec39e7
Adjust defaults
yvonnefroehlich 787530d
Update gallery example
yvonnefroehlich 7601e93
Fix typo
yvonnefroehlich ec13d17
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich 1f1bfd9
Adjust gallery example
yvonnefroehlich 1b51c05
Adjust docstring
yvonnefroehlich ebcf510
Fix typo
yvonnefroehlich 9dbf096
Update docstrings
yvonnefroehlich b07fe8c
Include 'orientation' parameter into 'wordmark' parameter
yvonnefroehlich ea9e9e0
Update gallery example
yvonnefroehlich 33a91b1
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich 4bb45af
Do not plot invisible basemap at the beginning
yvonnefroehlich 33517d6
Remove un-needed variable
yvonnefroehlich f7e5cd6
Fix variable name after renaming for coding style
yvonnefroehlich 11b9a49
Remove un-needed comment
yvonnefroehlich 95aee4f
Remove un-needed code block
yvonnefroehlich d4c17ae
Fix code style
yvonnefroehlich 3cdd4f3
Update intro text of gallery example
yvonnefroehlich 38e15f7
Update docs
yvonnefroehlich 2f6decb
Use fixed angle for rotation -> remove variable
yvonnefroehlich eaa6e12
Shorten variable names
yvonnefroehlich 85d09d2
Shorten variable names for compass lines
yvonnefroehlich a994624
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich 8116295
Remove un-needed string f
yvonnefroehlich a50ebfd
Update parameter names
yvonnefroehlich f0f7fbd
Update gallery example
yvonnefroehlich 6d360d3
Improve docs
yvonnefroehlich b74eb73
Fit code in one line
yvonnefroehlich 0cec697
Fit code in one line
yvonnefroehlich eaed88a
Fix comments
yvonnefroehlich 3b8f3d7
Improve comment
yvonnefroehlich 28e79ae
Fix typo
yvonnefroehlich b766c1b
Fix length
yvonnefroehlich 62a70b8
Remove un-used 'no_clip' parameter
yvonnefroehlich d01531f
Remove un-needed 'no_clip' parameter
yvonnefroehlich 5086e11
Adjust variable name
yvonnefroehlich b969a82
Remove un-needed 'no_clip' parameter
yvonnefroehlich d4effc4
Add 'no_clip' parameter back for hexagon shape
yvonnefroehlich 9732287
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich c78b2f3
Add 'no_clip' parameter back for hexagon shape
yvonnefroehlich 0867085
TEST Add invisible basemap back to also have a square for hexagon shape
yvonnefroehlich 77636b6
Adjust size of basemap in all combination test plot
yvonnefroehlich 229046c
Fix syntax and use maximum line lenght
yvonnefroehlich 9b7d1e9
Fix highlighting
yvonnefroehlich 54f8880
Fix typo in code
yvonnefroehlich 5c8e12f
Fix line length
yvonnefroehlich 5fd657f
Remove invisble basemap
yvonnefroehlich 1ed44b4
Add code for all versions
yvonnefroehlich 92ccf97
Fix seperator
yvonnefroehlich 3296b11
Add more combinations
yvonnefroehlich 858e532
Reorder versions
yvonnefroehlich 9a0f12e
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich e86f164
Improve region and projection arguments
yvonnefroehlich ed4a782
Adjust pen for arrow
yvonnefroehlich 7fcbc03
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich e0ede2e
First version of polygon for letter M
yvonnefroehlich b8d9e8c
Get ride of the xshift for letter M
yvonnefroehlich 17c3503
Fine tune x and y values
yvonnefroehlich 80a1487
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich 08b3551
Merge branch 'main' into code-pygmt-logo
yvonnefroehlich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,256 @@ | ||
""" | ||
PyGMT logo | ||
========== | ||
The PyGMT logo coded in Python using PyGMT. The design of the logo is kindly provided | ||
by `@sfrooti <https://github.com/sfrooti>`_. The logo consists of a visual and the | ||
wordmark "PyGMT". There are different versions available: | ||
|
||
- ``color_concept``: colors of the visual and workmark. | ||
Select between ``"colors"`` (colors for Python (blue and yellow) and GMT (red)) and | ||
``"bw"`` for black and white. | ||
[Default is ``"color"``]. | ||
- ``bg_concept``: color of the background. | ||
Select between ``"light"`` (white) and ``"dark"`` (darkgray / gray20). | ||
[Default is ``"dark"``]. | ||
- ``shape``: shape of the visual. | ||
Select between ``"circle"`` and ``"hexagon"``. | ||
[Default is ``"circle"``]. | ||
- ``angle_rot``: rotation angle of the visual. | ||
Give an angle in degrees (mesuared contour-clockwise from the vertical). | ||
[Default is ``30``]. Should this be flexible ??? | ||
- ``wordmark``: add the wordmark "PyGMT". | ||
``True`` or ``False``. | ||
[Default is ``True``]. ??? | ||
- ``orientation``: orientation of the wordmark. | ||
Select between ``"vertical"`` (at the bottom) and ``"horizontal"`` (at the right). | ||
[Default is ``"vertical"``]. | ||
""" | ||
|
||
# %% | ||
from pathlib import Path | ||
|
||
import pygmt | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Changebale settings (-> adjust for your needs; later input for function) | ||
# ----------------------------------------------------------------------------- | ||
color_concept = "color" # "color" | "bw" | ||
bg_concept = "dark" # "light" | "dark" | ||
shape = "circle" # "circle" | "hexagon" | ||
angle_rot = 30 # degrees | ||
wordmark = True # True | False | ||
orientation = "horizontal" # "horizontal" | "vertical" | ||
dpi_png = 720 # resolution of saved PNG image | ||
|
||
|
||
# ----------------------------------------------------------------------------- | ||
# Define colors (-> can be discussed) | ||
# ----------------------------------------------------------------------------- | ||
if color_concept == "color": | ||
color_blue = "48/105/152" # Python blue | ||
color_yellow = "255/212/59" # Python yellow | ||
color_red = "238/86/52" # GMT red | ||
elif color_concept == "bw" and bg_concept == "light": | ||
color_blue = color_yellow = color_red = "gray20" | ||
elif color_concept == "bw" and bg_concept == "dark": | ||
color_blue = color_yellow = color_red = "white" | ||
|
||
match bg_concept: | ||
case "light": | ||
color_bg = "white" | ||
color_py = color_blue | ||
color_gmt = "gray20" | ||
case "dark": | ||
color_bg = "gray20" | ||
color_py = color_yellow | ||
color_gmt = "white" | ||
|
||
|
||
# ----------------------------------------------------------------------------- | ||
# Not-changebale settings (-> need to extended) | ||
# ----------------------------------------------------------------------------- | ||
size = 5 | ||
region = [-size, size] * 2 | ||
|
||
xy_yellow_1 = 2.65 | ||
xy_yellow_2 = 1.3 | ||
|
||
pen_yellow = f"5p,{color_yellow}" | ||
pen_red = f"10p,{color_red}" | ||
|
||
|
||
# %% | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Start plotting | ||
# ----------------------------------------------------------------------------- | ||
|
||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# Creating the visual | ||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
fig = pygmt.Figure() | ||
pygmt.config(MAP_FRAME_PEN="cyan@100") | ||
fig.basemap(region=region, projection=f"X{size * 2}c", frame=[0, "+gcyan@100"]) | ||
|
||
# ............................................................................. | ||
# blue circle / hexagon for Earth | ||
# ............................................................................. | ||
match shape: | ||
case "circle": | ||
style = "c7.5c" | ||
case "hexagon": | ||
style = "h8.6c" | ||
fig.plot(x=0, y=0, style=style, pen=f"15p,{color_blue}", fill=color_bg) | ||
|
||
# ............................................................................. | ||
# yellow lines for compass | ||
# ............................................................................. | ||
# horizontal yellow line | ||
fig.plot(x=[-4, 4], y=[0, 0], pen=pen_yellow) | ||
# diagonal yellow lines | ||
# upper left | ||
fig.plot(x=[-xy_yellow_1, -xy_yellow_2], y=[xy_yellow_1, xy_yellow_2], pen=pen_yellow) | ||
# lower right | ||
fig.plot(x=[xy_yellow_2, xy_yellow_1], y=[-xy_yellow_2, -xy_yellow_1], pen=pen_yellow) | ||
# lower left | ||
fig.plot(x=[-xy_yellow_1, -xy_yellow_2], y=[-xy_yellow_1, -xy_yellow_2], pen=pen_yellow) | ||
# upper right | ||
fig.plot(x=[xy_yellow_2, xy_yellow_1], y=[xy_yellow_2, xy_yellow_1], pen=pen_yellow) | ||
|
||
# ............................................................................. | ||
# letter G | ||
# ............................................................................. | ||
# horizontal red line | ||
fig.plot(x=[0.1, 1.65], y=[0, 0], pen=f"12p,{color_red}") | ||
# red ring sector | ||
fig.plot(x=0, y=0, style="w3.3c/90/0+i2.35c", fill=color_red) | ||
# space between yellow lines and ring sector | ||
fig.plot(x=0, y=0, style="w3.7c/0/360+i3.3c", fill=color_bg) | ||
# vertical yellow line | ||
fig.plot(x=[0, 0], y=[-4, 4], pen=f"6p,{color_yellow}") | ||
# cover yellow line in lower part of the ring sector | ||
fig.plot(x=0, y=0, style="w3.3c/260/-80+i2.35c", fill=color_red) | ||
|
||
# ............................................................................. | ||
# upper vertical red line | ||
# ............................................................................. | ||
# space between red line and blue circle / hexagon | ||
fig.plot(x=[0, 0], y=[4.01, 3.0], pen=f"18p,{color_bg}") | ||
# red line | ||
fig.plot(x=[0, 0], y=[4.00, 1.9], pen=f"12p,{color_red}") | ||
|
||
# ............................................................................. | ||
# letter M | ||
# ............................................................................. | ||
# space between letter M and yellow line at the right side | ||
fig.plot(x=[1.6, 1.6], y=[1.5, 1.775], pen=f"10p,{color_bg}") | ||
# fig.plot(x=[1.6, 1.6], y=[1.5, 2.0], pen=f"10p,{color_bg}") | ||
# diagonal lines | ||
fig.plot(x=[0.33, 0.90], y=[1.527, 1.00], pen=pen_red) | ||
fig.plot(x=[0.90, 1.43], y=[1.00, 1.527], pen=pen_red) | ||
# middle pick | ||
fig.plot(x=0.9, y=0.9, style="d0.3c", fill=color_red) | ||
# vertical lines with small distance to horizontal line of letter G | ||
fig.plot(x=[0.285, 0.285], y=[0.30, 1.65], pen=pen_red) | ||
fig.plot(x=[1.47, 1.47], y=[0.30, 1.65], pen=pen_red) | ||
|
||
# ............................................................................. | ||
# letter T | ||
# ............................................................................. | ||
# red curved horizontal line | ||
fig.plot(x=0, y=0, style="w4.6c/240/-60+i3.7c", fill=color_red) | ||
# vertical endings of curved horizontal line | ||
fig.plot(x=[-1.05, -1.05], y=[-1.5, -2.5], pen=f"9p,{color_bg}") | ||
fig.plot(x=[1.05, 1.05], y=[-1.5, -2.5], pen=f"9p,{color_bg}") | ||
# arrow head as inverse triangle with pen for space to blue circle / hexagon | ||
fig.plot(x=0, y=-3.55, style="i1.1c", fill=color_red, pen=f"3p,{color_bg}") | ||
# arrow tail | ||
fig.plot(x=[0, 0], y=[-2, -3.57], pen=f"12p,{color_red}") | ||
|
||
# ............................................................................. | ||
# Save | ||
# ............................................................................. | ||
# fig.show() | ||
fig_name = f"pygmt_logo_{shape}_{color_concept}_{bg_concept}" | ||
fig.savefig(fname=f"{fig_name}.eps", dpi=dpi_png) | ||
print(fig_name) | ||
|
||
|
||
# %% | ||
|
||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# Replot and apply rotation | ||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
fig = pygmt.Figure() | ||
pygmt.config(MAP_FRAME_PEN="cyan@100") | ||
fig.basemap(region=region, projection=f"X{size * 2}c", frame=[0, f"+g{color_bg}"]) | ||
|
||
fig.image( | ||
imagefile=f"{fig_name}.eps", | ||
position=f"jMC+w{size * 2}c", | ||
# Rotation around z (vertical) axis placed in the center | ||
perspective=f"{angle_rot}+w0/0", | ||
) | ||
|
||
# ............................................................................. | ||
# Save | ||
# ............................................................................. | ||
# fig.show() | ||
fig_name_rot = f"{fig_name}_rot{angle_rot}deg" | ||
exts = ["eps"] if wordmark is True else ["png", "pdf", "eps"] | ||
for ext in exts: | ||
# transparent = True if ext == "png" else False # problems with code style | ||
transparent = False | ||
if ext == "png": | ||
transparent = True | ||
fig.savefig(fname=f"{fig_name_rot}.{ext}", dpi=dpi_png, transparent=transparent) | ||
print(fig_name_rot) | ||
|
||
|
||
# %% | ||
|
||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# Replot and add WordMark "PyGMT" | ||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
if wordmark is True: | ||
match orientation: | ||
case "vertical": | ||
projection = f"X{size * 2 - 2}c/{size * 2}c" | ||
position = f"jMC+w{size * 2}c+o0c/1.1c" | ||
args_text = {"x": -3.6, "y": -3.6, "justify": "LM"} | ||
args_cover = {"x": -2.4, "y": -3.6} | ||
case "horizontal": | ||
projection = f"X{size * 2}c/{size - 2}c" | ||
position = f"jLM+w{size - 1.5}c" | ||
args_text = {"x": -1.5, "y": 0, "justify": "LM"} | ||
args_cover = {"x": -0.5, "y": -0.2} | ||
|
||
fig = pygmt.Figure() | ||
pygmt.config(MAP_FRAME_PEN="cyan@100") | ||
fig.basemap(region=region, projection=projection, frame=[0, f"+g{color_bg}"]) | ||
|
||
fig.image(imagefile=f"{fig_name_rot}.eps", position=position) | ||
|
||
fig.text(text="PyGMT", font=f"50p,AvantGarde-Book,{color_gmt}", **args_text) | ||
fig.plot(style="s2.9c", fill=color_bg, **args_cover) | ||
fig.text(text="Py", font=f"50p,AvantGarde-Book,{color_py}", **args_text) | ||
|
||
# ............................................................................. | ||
# Save | ||
# ............................................................................. | ||
fig_name_rot_text = f"{fig_name_rot}_wordmark_{orientation}" | ||
for ext in ["png", "pdf", "eps"]: | ||
# transparent = True if ext == "png" else False # problems with code style | ||
transparent = False | ||
if ext == "png": | ||
transparent = True | ||
fig.savefig( | ||
fname=f"{fig_name_rot_text}.{ext}", dpi=dpi_png, transparent=transparent | ||
) | ||
print(fig_name_rot_text) | ||
Path.unlink(f"{fig_name_rot}.eps") | ||
|
||
|
||
# %% | ||
fig.show() | ||
Path.unlink(f"{fig_name}.eps") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.