GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
758 stars 220 forks source link

Gallery/tutorial example showing how to use/create custom symbols #1349

Closed michaelgrund closed 6 months ago

michaelgrund commented 3 years ago

Description of the desired feature

I already opened a PR to add a gallery example showing different custom symbols (#1348 ). However, I feel it would be great to have a short tutorial in which it is shown how users could generate their own custom symbols (based on the information and instructions available from https://docs.generic-mapping-tools.org/latest/cookbook/custom-symbols.html).

yvonnefroehlich commented 1 year ago

This issue is already a bit older. However, the possibility to create own symbols points out the high level of customization of GMT / PyGMT. @michaelgrund are you or is somebody else already working on a related tutorial or gallery example or do you plan to do so in the future? In case no, I would like to ask whether I can try working on this over the next weeks.

@GenericMappingTools/pygmt-maintainers I am also fine with working on one of the issues #2004 or #2000. However, both have the good first issue label. Or do you prefer that I first have a look at issue #2282?

yvonnefroehlich commented 6 months ago

@GenericMappingTools/pygmt-maintainers I think about working on this issue over time. But before putting more effort into a gallery example or tutorial, I want to ask whether somebody else is already working on this locally without submitting a PR yet.

seisman commented 6 months ago

I don't have any local branch on this issue. Actually, I'm unsure if we really need such a tutorial/example.

Custom symbols have complicated syntax, as shown in https://docs.generic-mapping-tools.org/latest/reference/custom-symbols.html. Are you going to explain the syntax?

yvonnefroehlich commented 6 months ago

Yes you are right, these own custom symbols can become quite complicated. If we decide to create a gallery example / tutorial, I feel we should explain the concept using simple own custom symbols (composed of standard symbols). For more completed custom symbols, the user is referred to the GMT documentation, which explains this macro language in detail.

One side idea was to just add a comment regarding the possibility of creating own custom symbols at the end of the already existing gallery example Custom symbols. Something in the direction of:

Beside these built-in custom symbols, GMT allows users to define their own custom symbols. For this, a specific macro language is used. A detailed introduction can be found at https://docs.generic-mapping-tools.org/6.5/reference/custom-symbols.html#the-macro-language. After defining such a symbol, it can be used for plotting in the same way as the built-in custom symbols. Please note: Custom symbols cannot be included in auto-legends yet.

Maybe this is enough, as there is no difference to GMT and the plotting works in the same way as the built-in custom symbols (for which we already have a gallery example).

seisman commented 6 months ago

One side idea was to just add a comment regarding the possibility of creating own custom symbols at the end of the already existing gallery example Custom symbols.

sounds good to me.