Skip to content

fix: Graphs not showing with Ansys visualizer #537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 3, 2025
1 change: 1 addition & 0 deletions doc/changelog.d/537.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Graphs not showing with Ansys visualizer
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

LaTeXBuilder.supported_image_types = ["image/png", "image/pdf", "image/svg+xml"]
os.environ["DOCUMENTATION_BUILDING"] = "true"

os.environ["PYANSYS_VISUALIZER_HTML_BACKEND"] = "true"
logger = logging.getLogger(__name__)

# Project information
Expand Down
6 changes: 1 addition & 5 deletions src/ansys/speos/core/lxp.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

from __future__ import annotations

import os
from pathlib import Path
from typing import TYPE_CHECKING, Optional, Union

Expand Down Expand Up @@ -520,10 +519,7 @@ def preview(
else:
for i in range(nb_ray):
self.__add_ray_to_pv(plotter, temp_rays[i], max_ray_length)
if os.environ.get("DOCUMENTATION_BUILDING", "false") == "true":
plotter.show(screenshot=screenshot, jupyter_backend="html")
else:
plotter.show(screenshot=screenshot)
plotter.show(screenshot=screenshot)
return self


Expand Down
6 changes: 1 addition & 5 deletions src/ansys/speos/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

from __future__ import annotations

import os
from pathlib import Path
import re
from typing import TYPE_CHECKING, List, Mapping, Optional, Union
Expand Down Expand Up @@ -972,7 +971,4 @@ def preview(
screenshot = Path(screenshot)

p = self._create_preview(viz_args=viz_args)
if os.environ.get("DOCUMENTATION_BUILDING", "true") == "true":
p.show(screenshot=screenshot, jupyter_backend="html")
else:
p.show(screenshot=screenshot)
p.show(screenshot=screenshot)