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

Figure.paragraph: Typeset one or multiple paragraphs #3710

Open
2 of 37 tasks
seisman opened this issue Dec 24, 2024 · 0 comments
Open
2 of 37 tasks

Figure.paragraph: Typeset one or multiple paragraphs #3710

seisman opened this issue Dec 24, 2024 · 0 comments
Labels
feature Brand new feature
Milestone

Comments

@seisman
Copy link
Member

seisman commented Dec 24, 2024

Figure.paragraph is a high-level wrapper of GMT's text module to typeset one or multiple paragraphs in a plot.

GMT options

Checked: Implemented; Unchecked: To be implemented/discussed; Strikethrough: Won't implement.

Input format

text's -M option means "paragraph mode". In this mode, the input file must be multi-segment files. Segments are separated by a special record whose first character must be flag [Default is >]. Multiple paragraphs are separated with a blank line. Its format is like:

> x y [font angle justify] linespace parwidth parjust
text for paragraph1

text for paragraph2
> x y [font angle justify] linespace parwidth parjust
text for paragraph3
  • x/y: position of the paragraph
  • font/angle: font and angle of the text [Requires -F]
  • justify: justification of the paragraph box [Requires -F]
  • linespace: line spacing
  • parwidth: paragraph width
  • parjust: text justification in the paragraph, can be l(eft), c(enter), r(ight), or j(ustified)

Notes:

  1. Multiple paragraphs should be separated by a blank line when passing to GMT. A sequence of string is the most Pythonic way to represent multiple paragraphs.
  2. When typesetting multiple paragraphs, each paragraph can have its own font/angle/justify/linespace/parwidth/parjust. It means the corresponding parameters should accept a sequence as input. I think it will makes codes much complicated, so prefer not to support it. Users who need different styles for different paragraphs can call Figure.paragraph multiple times.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Brand new feature
Projects
Status: 0) Wishlist
Development

No branches or pull requests

2 participants