.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/stereographic_projection/wulff_net.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_stereographic_projection_wulff_net.py: ========= Wulff net ========= This example shows how to draw a customized Wulff net in stereographic plots using :meth:`~orix.plot.StereographicPlot.wulff_net` .. GENERATED FROM PYTHON SOURCE LINES 27-35 .. code-block:: Python import matplotlib.pyplot as plt from orix.plot import register_projections from orix.quaternion.symmetry import C6h register_projections() # Register our custom Matplotlib projections .. GENERATED FROM PYTHON SOURCE LINES 36-38 Plot two stereographic projections, one with the standard Wulff net, another with a customized net .. GENERATED FROM PYTHON SOURCE LINES 38-61 .. code-block:: Python fig = plt.figure(figsize=(6, 4), layout="tight") ax0 = fig.add_subplot(121, projection="stereographic") ax1 = fig.add_subplot(122, projection="stereographic") # Display a standard Wulff net with 2 degree minor markers and 10 degree # major markers, with 10 degree caps at the tops and bottoms. ax0.set_title("Standard Wulff net") ax0.wulff_net() # The grid spacing can also be changed or turned on and off, similar to # matplotlib.axes.Axes.grid(). Here, the latitudinal grid is set to 3 # degrees (15 degrees for major grid lines), and the longitudinal to 9 # degrees (45 degrees for major grid lines). ax1.set_title("Custom Wulff net") ax1.wulff_net(True, 3, 9, 15, 45, 15) # Turn it off ax1.wulff_net() # Then turn it back on, with the previously defined grid spacing saved. ax1.wulff_net() .. image-sg:: /examples/stereographic_projection/images/sphx_glr_wulff_net_001.png :alt: Standard Wulff net, Custom Wulff net :srcset: /examples/stereographic_projection/images/sphx_glr_wulff_net_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 62-64 The net also displays nicely for inverse pole figures (stereographic projections restricted to a fundamental sector) .. GENERATED FROM PYTHON SOURCE LINES 64-71 .. code-block:: Python fig = plt.figure(layout="tight") ax = fig.add_subplot(projection="ipf", symmetry=C6h) ax.wulff_net() ax.set_title(f"{C6h.name} inverse pole figure", pad=30) plt.show() .. image-sg:: /examples/stereographic_projection/images/sphx_glr_wulff_net_002.png :alt: 6/m inverse pole figure :srcset: /examples/stereographic_projection/images/sphx_glr_wulff_net_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.182 seconds) **Estimated memory usage:** 548 MB .. _sphx_glr_download_examples_stereographic_projection_wulff_net.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: wulff_net.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: wulff_net.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: wulff_net.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_