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

Title location and alignment #4410

Merged
merged 11 commits into from
Oct 2, 2022
Merged

Title location and alignment #4410

merged 11 commits into from
Oct 2, 2022

Conversation

ivan-boikov
Copy link
Contributor

Adds manual plot title positioning with a tuple (x,y) (as was done in PGFPlotsX) for GR and Plotly.
Also adds title font alignment for GR, Plotly and PGFPlotsX since it also impacts title position.

Problems:

  • PGFPlotsX puts title center at given coordinates and then aligns, while GR and Plotly align entire title relative to given coordinates. I am not sure what's the expected behaviour, so I left as it was.
  • UnicodePlots does not allow control over title location
  • InspectDR only supports offset in vertical direction, moreover plot area is painted over title, so title cannot be placed inside plot as in GR, Plotly and PGFPlotsX

Partially fixes #4407 (since only GR and Plotly are fixed).

src/backends/gr.jl Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 1, 2022

Codecov Report

Base: 80.87% // Head: 80.80% // Decreases project coverage by -0.06% ⚠️

Coverage data is based on head (805b6d3) compared to base (341348a).
Patch coverage: 62.50% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4410      +/-   ##
==========================================
- Coverage   80.87%   80.80%   -0.07%     
==========================================
  Files          30       30              
  Lines        7439     7445       +6     
==========================================
  Hits         6016     6016              
- Misses       1423     1429       +6     
Impacted Files Coverage Δ
src/backends/gr.jl 88.88% <60.00%> (-0.45%) ⬇️
src/backends/pgfplotsx.jl 76.26% <100.00%> (+0.04%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@t-bltg t-bltg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is difficult to test this without ref images (since it is backend dependent), and I don't think adding some is necessary, so LGTM.

Problems:

This is already an improvement over the current state: it is left for another PR.

@t-bltg t-bltg merged commit 179cbc2 into JuliaPlots:master Oct 2, 2022
@ivan-boikov ivan-boikov deleted the ib-titleloc branch March 23, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Plot title location is ignored
2 participants