champsproject / ldds

Python package for computing and visualizing Lagrangian Descriptors in Dynamical Systems
BSD 3-Clause "New" or "Revised" License
17 stars 2 forks source link

Plotting function coloring unstable and stable manifolds using gradient-extraction. #30

Closed vkrajnak closed 3 years ago

vkrajnak commented 3 years ago

Fixed plotting fuction to show unstable manifolds in red, stable in blue. As a consequence, the gradient of the total LD for 1D centre shows only numerical artefacts - as one would expect in a system with no invariant manifolds.

vkrajnak commented 3 years ago

Any suggestions?

broncio123 commented 3 years ago

Any suggestions?

I wanted to plot a single LD and its gradient. Then, I found this.

draw_all_lds([], LD_backward, grid_parameters, tau, p_value)

Returns

image

draw_all_lds(LD_forward, [], grid_parameters, tau, p_value)

Returns

image

Reds should be for LD backwards and Blues for stable according to convention.

vkrajnak commented 3 years ago

Better?

broncio123 commented 3 years ago

Suggestion: In LD_Python_Examples.ipynb, add an example using ld_plot alone to plot a single LD type with(out) interactivity, assuming someone would like to plot one LD type alone.

vkrajnak commented 3 years ago

Suggestion: In LD_Python_Examples.ipynb, add an example using ld_plot alone to plot a single LD type with(out) interactivity, assuming someone would like to plot one LD type alone.

Good idea!

vkrajnak commented 3 years ago

Should be all good now

broncio123 commented 3 years ago

Should be all good now

All function changes look appropriate. Minor improvements in the LD_Python_Examples notebook can be done.

Since draw_all_lds returns plot handles when running the LD_Python_Examples notebook these are outputted shown in the screenshot. This is easy to fix by directing to a variable, for instance, obj = draw_all_lds.

Also, the HOW-TOs section is missing concrete examples on how to use the set of tools in tools.py for users to customise their plots. This is important as these sections can be later on used for documentation of the package.

Apart from this, you can go ahead with the pull request.

image

vkrajnak commented 3 years ago

Also, the HOW-TOs section is missing concrete examples on how to use the set of tools in tools.py for users to customise their plots. This is important as these sections can be later on used for documentation of the package.

Done.