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

Potentially imrpvoe plotting recepie #403

Open
TorkelE opened this issue Mar 9, 2025 · 3 comments
Open

Potentially imrpvoe plotting recepie #403

TorkelE opened this issue Mar 9, 2025 · 3 comments

Comments

@TorkelE
Copy link
Member

TorkelE commented Mar 9, 2025

Example:

using DataInterpolations, Plots
I_grid = collect(0.0:10.0:200.0)
spline1d = LinearInterpolation(200.0*I_grid ./ (200.0 .+ I_grid), I_grid)
plot(spline1d; label = "Meassured infection rate")

Image

Maybe the plot can be improved? Ideally the Line+Dots could be in a single label, instead of being repeated. It could also, maybe, be neat if they by default had the same color. Juts some ideas.

@TorkelE
Copy link
Member Author

TorkelE commented Mar 9, 2025

If I remove the label, the line and dots do have different texts (LinearInterpolation/Data Points), so in that case the separate labels do make sense.

@sathvikbhagavan
Copy link
Member

yes, you don't need label for plotting any interpolation

@TorkelE
Copy link
Member Author

TorkelE commented Mar 9, 2025

Right, but then I get generic names. Here I would like to plot it with specific name(s) that I designate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants