.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples_gallery/output/logarithmic_kymograph.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_gallery_output_logarithmic_kymograph.py: Logarithmic kymograph ===================== This example demonstrates a space-time plot with a logarithmic time axis (using :func:`utilitiez.densityplot`), which is useful to analyze coarsening processes. .. GENERATED FROM PYTHON SOURCE LINES 8-29 .. image-sg:: /examples_gallery/output/images/sphx_glr_logarithmic_kymograph_001.png :alt: logarithmic kymograph :srcset: /examples_gallery/output/images/sphx_glr_logarithmic_kymograph_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt from utilitiez import densityplot import pde # define grid, initial field, and the PDE grid = pde.UnitGrid([128]) field = pde.ScalarField.random_uniform(grid, -0.1, 0.1) eq = pde.CahnHilliardPDE(interface_width=2) # run the simulation and store data in logarithmically spaced time intervals storage = pde.MemoryStorage() res = eq.solve( field, t_range=1e5, adaptive=True, tracker=[storage.tracker("geometric(10, 1.1)")] ) # create the density plot, which detects the logarithmically scaled time densityplot(storage.data, storage.times, grid.axes_coords[0]) plt.xlabel("Time") plt.ylabel("Space") .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 6.162 seconds) .. _sphx_glr_download_examples_gallery_output_logarithmic_kymograph.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: logarithmic_kymograph.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: logarithmic_kymograph.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: logarithmic_kymograph.zip `