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

FR: Avoid manual update for the caption of time profile plot #264

Closed
IndrajeetPatil opened this issue May 11, 2022 · 3 comments
Closed

FR: Avoid manual update for the caption of time profile plot #264

IndrajeetPatil opened this issue May 11, 2022 · 3 comments
Assignees
Labels
question Further information is requested type: bug Something isn't working

Comments

@IndrajeetPatil
Copy link
Member

It's not clear to me as to why, but, the caption for tlf::plotTimeProfile() output needs to be manually updated using setLegendCaption(). This is quite tricky and error-prone.

Is there any way that this is internally handled by the plotting function itself?

It is a bit surprising that the caption is not automatically updated to the chosen mappings for the plot, and needs to be updated manually.

@msevestre
Copy link
Member

Agreed.

@msevestre msevestre added question Further information is requested type: bug Something isn't working labels May 11, 2022
@pchelle
Copy link
Collaborator

pchelle commented May 12, 2022

@IndrajeetPatil
Not sure I understand what you mean there, can you add an example ?

@IndrajeetPatil
Copy link
Member Author

IndrajeetPatil commented May 12, 2022

Sure.

Not sure if you remember, but we had this issue where instead of each group getting its own color, the same colors were being recycled. This is why we added this function that updates caption legend data frame.

Here are outputs from this test that illustrate the point.

Without updating legend caption data frame

(Note that there are only 3 unique colors which are used twice in the caption and the plot when there are 6 groups)

image

With updating legend caption data frame

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants