Skip to content

Commit b1826b0

Browse files
committed
[ENH] Added function to plot models to Liquid Earth API
This update introduces a new function 'plot_to_liquid_earth' allowing geology models to be visualized via the Liquid Earth API. This feature supports both existing and new spaces. Also, token handling has been improved, where tokens can now be retrieved directly from the system environment variables. Tests and documentation in the tutorial also have been updated accordingly.
1 parent 0f3f582 commit b1826b0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

examples/tutorials/ch1_fundamentals/ch1_7_3d_visualization.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
# %%
5555

5656
# sphinx_gallery_thumbnail_number = 2
57-
gpv = gpv.plot_3d(
57+
plot_3d = gpv.plot_3d(
5858
model=geo_model,
5959
plotter_type='basic',
6060
off_screen=False,
@@ -63,3 +63,15 @@
6363
show_lith=True,
6464
kwargs_plot_structured_grid={'opacity': .5}
6565
)
66+
67+
# %%
68+
link = gpv.plot_to_liquid_earth(
69+
geo_model=geo_model,
70+
space_name="new_space_name",
71+
file_name="gempy_model",
72+
user_token=None, # If None, it will try to grab it from the environment
73+
grab_link=True
74+
)
75+
76+
print(link)
77+
link

0 commit comments

Comments
 (0)