Conversation
|
/format |
|
I feel the logo definition should be separated into a standalone method, similar to the method to plot the GMT logo. This would allow to plot the PyGMT logo by calling something like |
|
ruff v0.10.0 was released 2 hours ago causing the newly falling code style checks. |
This reverts commit 64f6c9a.
| fig.plot(x=x, y=y, pen=f"{thin}c,{yellow}", perspective=True) | ||
| # fig.show() | ||
|
|
||
| # Letter G |
There was a problem hiding this comment.
Time to work on the PyGMT logo and refresh my memory about it.
I'm wondering if it helps to define a few private helper functions inside the create_logo function, e.g., _letter_g_coords (lines 150-161), _letter_m_coords (lines 175-210), and _letter_t_coords (lines 216-220), which returns x/y coordinates of letters G/M/T, respectively. It would shorten the create_logo function, but may make it easier to read.
Description of proposed changes
Related to #1404 (comment), create the PyGMT logo in Python with PyGMT.
Figure.pygmtlogoorFigure.logo_pygmtas part of theFigureclass or addition to the methodFigure.logo(which plots the GMT logo)Preview:
Related to
TODO:
shape="circle" | "hexagon"orhex=False | TrueFigure.image)Figureclass or addition toFigure.logo.Issues:
Figureobjects using the saved eps files. Maybe this is not easy to handle when converting to a method of theFigureclasse.Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash command is:
/format: automatically format and lint the code