Skip to content

Commit

Permalink
Fix issues with PyVista 0.41.0 (#1045)
Browse files Browse the repository at this point in the history
* Set pyvista==0.41.0

* Use pv.global_theme instead of deprecated pv.rcParams

* Use pv.global_theme instead of deprecated pv.rcParams

* Set back to PyVista 0.36.1 in requirements_docs.txt, stil an issue with scalar bars only on the GitHub doc CI

(cherry picked from commit dd09263)
  • Loading branch information
PProfizi committed Jul 21, 2023
1 parent 131740d commit 865ba2e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
pyvista.OFF_SCREEN = True
# Preferred plotting style for documentation
# pyvista.set_plot_theme('document')
pyvista.rcParams["window_size"] = np.array([1024, 768]) * 2
pyvista.global_theme.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):
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ pytest==7.2.0
pytest-cov==4.0.0
pytest-order==1.0.1
pytest-rerunfailures==11.0
pyvista==0.36.1
pyvista==0.41.0
8 changes: 4 additions & 4 deletions src/ansys/dpf/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def set_default_pyvista_config():
if module_exists("pyvista"):
import pyvista as pv

pv.rcParams["interactive"] = True
pv.rcParams["cmap"] = "jet"
pv.rcParams["font"]["family"] = "courier"
pv.rcParams["title"] = "DPF"
pv.global_theme.interactive = True
pv.global_theme.cmap = "jet"
pv.global_theme.font.family = "courier"
pv.global_theme.title = "DPF"


def bypass_pv_opengl_osmesa_crash():
Expand Down

0 comments on commit 865ba2e

Please sign in to comment.