Skip to content
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

Add a separate function to generate the PyGMT logo? #3848

Open
seisman opened this issue Mar 13, 2025 · 1 comment
Open

Add a separate function to generate the PyGMT logo? #3848

seisman opened this issue Mar 13, 2025 · 1 comment
Labels
discussions Need more discussion before taking further actions

Comments

@seisman
Copy link
Member

seisman commented Mar 13, 2025

We're very close to finalizing the PyGMT logo design in #1404. #1404 (comment) shows that it's possible to produce PyGMT logos with pure PyGMT codes.

After finishing #1404, we need to decide what to do with the logo-plotting codes. We have some options

  1. Create a standalone repository for PyGMT logos and store the codes in that repository
  2. Add the logo-plotting codes as a gallery example
  3. Add a separate plotting method Figure.pygmtlogo to produce the logo
  4. Extend the existing Figure.logo method to produce the PyGMT logo
@seisman seisman added the discussions Need more discussion before taking further actions label Mar 13, 2025
@yvonnefroehlich
Copy link
Member

yvonnefroehlich commented Mar 13, 2025

I think it would be cool to have a method pygmt.Figure.pygmtlogo within the pygmt.Figure() class to handle plotting the PyGMT logo into a Figure instance, similar to pygmt.Figure.logo for the GMT logo (or include this into pygmt.Figure.logo). And then have a gallery example like this:

fig = pygmt.Figure()
fig.basemap(region=[-5, 5, -5, 5], projection="X10c", frame=True)
fig.pygmtlogo(position="jMC", etc.)
fig.show()

The Python script in #3489 can be easly converted to a function

def pygmtlogo(
    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
):
...  # codes in 3489

pygmtlogo()
pygmtlogo(wordmark=True, orientation="vertical")
pygmtlogo(bg_concept="light", wordmark=True, orientation="vertical")

However, I would definitly need help to modifiy and convert these codes to a method within the pygmt.Figure() class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussions Need more discussion before taking further actions
Projects
None yet
Development

No branches or pull requests

2 participants