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

Convenience functions for plotting #63

Closed
JanJereczek opened this issue Dec 11, 2023 · 5 comments
Closed

Convenience functions for plotting #63

JanJereczek opened this issue Dec 11, 2023 · 5 comments

Comments

@JanJereczek
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Plotting of the results is generic. Therefore providing a convenience function for it would cut down the amount of code needed.

Describe the solution you'd like
Rely on CairoMakie and allow something like:

plot(results, signif)
@Datseris
Copy link
Member

I added a first draft of these functions here:

https://github.com/JuliaDynamics/TransitionsInTimeseries.jl/blob/main/ext/TITVisualizations.jl

a new PR needs to document them and add them in the examples in the docs.

@JanJereczek
Copy link
Contributor Author

JanJereczek commented Jan 9, 2024

Thanks for starting this, George! I would mainly suggest one modification. I think we should have a plot with n+1 rows and 1 column, with n the number of indicators. In the first row, we plot the input timeseries and optionally some surrogates in a lighter shading. For the i+1-th row, we plot the timeseries of the i-th indicator and its change metric.

I think this fits better than what we have so far (plotting all indicators on one axis), since they can have very different orders of magnitude, which is very inconvenient for visualisation.

If you agree, I am happy to make this change in the code and make a PR soon :)

@Datseris
Copy link
Member

Datseris commented Jan 9, 2024

What about the change metrics? where do you plot those? Or do you suggest that we plot directly the change metrics?

@JanJereczek
Copy link
Contributor Author

Since each indicator has a subplot assigned to it, it is easy to add an axis to each of them to visualise the change metric associated with the indicator. Something like:

indic_ax = Axis(fig[i, 1], yaxisposition = :left)
chng_ax = Axis(fig[i, 1], yaxisposition = :right)

@Datseris
Copy link
Member

Datseris commented Jan 9, 2024

So you mean to plot the indicator timeseries and the change metric timeseries in the same panel? Yes, we can do that.

@Datseris Datseris closed this as completed Feb 2, 2024
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