...
In particular there are some predefined Tcl procs that run python code, like GiD_Python_Exec
which expects the python code to be evaluated.
Since GiD version 17, matplotlib modules does not come with GiD.
Install matplotlib Python module with:
-np- GiD_Python_PipInstallMissingPackages [list matplotlib]
From now on you can use the matplot module.
Example: matplotlib graph of a line
...
GiD_Python_Exec
does an implicit package require tohil
that load it and then calls tohil::exec
with the provided script.
...
This demo file can be sourced ( loaded and executed ) writing this command ( replace <GiDdirectory>
GIDDEFAULT
is a Tcl global variable with the correct path to the GiD directory)-np- GiD_Python_Source {<GiDdirectory>/[file join $GIDDEFAULT scripts/tohil/doc/demo_matplotlib.py}]
and then this window will appear:
...
...
Force reload of a Python file
Other Tcl procs related to Python code are GiD_Python_Import_File
and GiD_Python_Import
.
...