Skip to content

Support for multi-line plot titles and introducing subtitles (also supporting multi-lines) #4562

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

Merged
merged 12 commits into from
Dec 10, 2020

Conversation

PaulWessel
Copy link
Member

Description of proposed changes

See #4557 for context. This PR implements two related features:

  1. It introduces a new +ssubtitle modifier to the -B frame settings. The +s requires the presence of +t.
  2. It introduces @^ (and #break;) as markers that break a title or subtitle into multiple lines.

I have added two examples that demonstrates these (longtitles_hat.sh.sh and longtitles_break.sh).

Given that @^ is pretty unique for breaking the line, do we still need #break;? Let me know if I can remove that before we merge.

longtitles_hat

If you feel the subtitle could be a tad smaller (it is 20p while the title is 24p) let me know. Below is what it looks with 24p/18p, which I think looks better personally:

longtitles_hat

Later, I will introduce the same to subplot -Theading option as welo, but currently its implementation requires me to make some changes first.

@PaulWessel PaulWessel added the new feature PR that implements a new feature or capability in GMT label Dec 10, 2020
@PaulWessel PaulWessel self-assigned this Dec 10, 2020
@joa-quim
Copy link
Member

joa-quim commented Dec 10, 2020

Given that @^ is pretty unique for breaking the line, do we still need #break;?

It's not that I dislike @^ by itself, but I don't like so much creating an escape sequence that it's only to be used in one single case (breaking title strings). So, for me we should only have #break (though I still prefer <break>).

24p/18p Looks better to me.

@PaulWessel
Copy link
Member Author

Happy to entertain opinions on this. I can imagine a near future where @^ could work in any other setting as well (say axes lables), so in that case perhaps @^ is not a bad idea anyway.

@PaulWessel
Copy link
Member Author

Now implemented with 18p size.

@maxrjones
Copy link
Member

and/or @^ seem fine to me. I agree with Joaquim that is very intuitive.

@joa-quim
Copy link
Member

Ok, so leave @^ and #break (the idea for longoptions is that they talk and @^ doesn't)

@PaulWessel
Copy link
Member Author

OK, will merge for now as is. If there were a consensus that <break> is a better choice than #break; then we can change it before 6.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature PR that implements a new feature or capability in GMT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants