How to use the pyvista.set_plot_theme function in pyvista

To help you get started, we’ve selected a few pyvista examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyvista / pyvista / tests / test_plotting.py View on Github external
def test_themes():
    pyvista.set_plot_theme('paraview')
    pyvista.set_plot_theme('document')
    pyvista.set_plot_theme('night')
    pyvista.set_plot_theme('default')
github pyvista / pyvista / docs / conf.py View on Github external
import os
import sys
if sys.version_info >= (3, 0):
    import faulthandler
    faulthandler.enable()

# -- pyvista configuration ---------------------------------------------------
import pyvista
import numpy as np
# Manage errors
pyvista.set_error_output_file('errors.txt')
# Ensure that offscreen rendering is used for docs generation
pyvista.OFF_SCREEN = True # Not necessary - simply an insurance policy
# Preferred plotting style for documentation
pyvista.set_plot_theme('document')
pyvista.rcParams['window_size'] = np.array([1024, 768]) * 2
# Save figures in specified directory
pyvista.FIGURE_PATH = os.path.join(os.path.abspath('./images/'), 'auto-generated/')
if not os.path.exists(pyvista.FIGURE_PATH):
    os.makedirs(pyvista.FIGURE_PATH)

# -- General configuration ------------------------------------------------
numfig = False
html_show_sourcelink = False
html_logo = './_static/pyvista_logo.png'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
              'sphinx.ext.napoleon',
github pyvista / pyvista / examples / 02-plot / themes.py View on Github external
pv.set_plot_theme("default")

plot_example()

###############################################################################
# PyVista also ships with a few plotting themes:
#
# * ``'ParaView'``: this is designed to mimic ParaView's default plotting theme
# * ``'night'``: this is designed to be night-mode friendly with dark backgrounds and color schemes
# * ``'document'``: this is built for use in document style plotting and making publication quality figures

###############################################################################
# Demo the ``'ParaView'`` theme

pv.set_plot_theme("ParaView")

plot_example()


###############################################################################
# Demo the ``'night'`` theme

pv.set_plot_theme("night")

plot_example()

###############################################################################
# Demo the ``'document'`` theme


pv.set_plot_theme("document")
github OpenGeoVis / PVGeo / docs / source / conf.py View on Github external
'overview/getting-started',
                         'overview/featured',
                         'overview/agu-2018',
                        ],
            append_material=append_material,
            extra=extra,
            )

import pyvista
import numpy as np
# Manage errors
pyvista.set_error_output_file('errors.txt')
# Ensure that offscreen rendering is used for docs generation
pyvista.OFF_SCREEN = True # Not necessary - simply an insurance policy
# Preferred plotting style for documentation
pyvista.set_plot_theme('document')


# -- Project information -----------------------------------------------------

project = 'PVGeo'
copyright = u'2018-2019, Bane Sullivan, http:://banesullivan.com'
author = 'Bane Sullivan'
html_show_copyright = False
html_show_sphinx = False

# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = ''
github pyvista / pyvista / examples / 02-plot / themes.py View on Github external
# * ``'ParaView'``: this is designed to mimic ParaView's default plotting theme
# * ``'night'``: this is designed to be night-mode friendly with dark backgrounds and color schemes
# * ``'document'``: this is built for use in document style plotting and making publication quality figures

###############################################################################
# Demo the ``'ParaView'`` theme

pv.set_plot_theme("ParaView")

plot_example()


###############################################################################
# Demo the ``'night'`` theme

pv.set_plot_theme("night")

plot_example()

###############################################################################
# Demo the ``'document'`` theme


pv.set_plot_theme("document")

plot_example()
github pyvista / pyvista / joss / images / code.py View on Github external
# Obligatory set up code
import pyvista
from pyvista import examples
import numpy as np
# Set a document-friendly plotting theme
pyvista.set_plot_theme('document')

# Load an example uniform grid
dataset = examples.load_uniform()
# Apply a threshold over a data range
threshed = dataset.threshold([100, 500]) # Figure 4 A

outline = dataset.outline()
contours = dataset.contour() # Figure 4 B
slices = dataset.slice_orthogonal() # Figure 4 C
glyphs = dataset.glyph(factor=1e-3, geom=pyvista.Sphere()) # Figure 4 D

# Two by two comparison
pyvista.plot_compare_four(threshed, contours, slices, glyphs,
                        {'show_scalar_bar':False},
                        {'border':False},
                        camera_position=[-2,5,3], outline=outline,