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

Notebook kernel crashes after using `draw_all_lds` to plot Stochastic Lagrangian Descriptor #41

Closed broncio123 closed 3 years ago

broncio123 commented 3 years ago

Branch: stochasticDS Under subsections TEST: Euler-Maruyama without noise within Noisy saddle or Duffing oscillator sections, when grid size is Nx, Ny = [1200, 1200]

THE PROBLEM: contourf crashes for the given number of contour lines n_levels = 100, figsize and resolution in dpi

TESTED: LD_forward generated with 1200 x 1200 grid size.

This code works fine.

import matplotlib.pyplot as plt

fig,ax = plt.subplots(1,2)
ax[0].contourf(LD_forward,100)
ax[1].contourf(LD_backward,100)
plt.show()

BUT this one makes the kernel die

import matplotlib.pyplot as plt

fig,ax = plt.subplots(1,2,figsize=(7.5,3), dpi=130)
ax[0].contourf(LD_forward,100)
ax[1].contourf(LD_backward,100)
plt.show()

Maybe an inherent issue of contourf? @vkrajnak @VikJGG I wonder if other plotting tools would be more stable, e.g., pcolor, pcolormesh, and imshow.

vkrajnak commented 3 years ago

Have you tried feeding it less data? 1200 x 1200 is a lot more points than the kernel actually renders

vkrajnak commented 3 years ago

As discussed, this should be addressed in the documentation

vkrajnak commented 3 years ago

Addressed in tutorial-1.ipynb