.. _sphx_glr_auto_examples_plot_code.py:
code
====
Include code in your presentation.
Code coloration is managed by `Pygments `_
.. warning::
This module is in very draft stage !!!
.. code-block:: python
from beampy import *
# Remove quiet=True to get beampy compilation outputs
doc = document(quiet=True)
with slide('A small python code'):
c = code("""
from pylab import *
n = range(10)
plot(n, n*random.rand(), 'ko')
for i in range(10):
print(i)
""", width=500)
display_matplotlib(gcs())
.. image:: /auto_examples/images/sphx_glr_plot_code_001.png
:align: center
Module arguments
================
.. autoclass:: beampy.code
:noindex:
.. only :: html
.. container:: sphx-glr-footer
.. container:: sphx-glr-download
:download:`Download Python source code: plot_code.py `
.. container:: sphx-glr-download
:download:`Download Jupyter notebook: plot_code.ipynb `
.. only:: html
.. rst-class:: sphx-glr-signature
`Gallery generated by Sphinx-Gallery `_