Skip to content

Commit dd09263

Browse files
authored
Fix issues with PyVista 0.41.0 (#1045)
* 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
1 parent 99e8b4f commit dd09263

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
pyvista.OFF_SCREEN = True
1515
# Preferred plotting style for documentation
1616
# pyvista.set_plot_theme('document')
17-
pyvista.rcParams["window_size"] = np.array([1024, 768]) * 2
17+
pyvista.global_theme.window_size = np.array([1024, 768]) * 2
1818
# Save figures in specified directory
1919
pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/")
2020
if not os.path.exists(pyvista.FIGURE_PATH):

requirements/requirements_test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ pytest==7.2.0
44
pytest-cov==4.0.0
55
pytest-order==1.0.1
66
pytest-rerunfailures==11.0
7-
pyvista==0.36.1
7+
pyvista==0.41.0

src/ansys/dpf/core/settings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def set_default_pyvista_config():
3232
if module_exists("pyvista"):
3333
import pyvista as pv
3434

35-
pv.rcParams["interactive"] = True
36-
pv.rcParams["cmap"] = "jet"
37-
pv.rcParams["font"]["family"] = "courier"
38-
pv.rcParams["title"] = "DPF"
35+
pv.global_theme.interactive = True
36+
pv.global_theme.cmap = "jet"
37+
pv.global_theme.font.family = "courier"
38+
pv.global_theme.title = "DPF"
3939

4040

4141
def bypass_pv_opengl_osmesa_crash():

0 commit comments

Comments
 (0)