Closed thensel23 closed 11 months ago
I am not sure I completely understand your use case. You have a sub_folder/sub_figure.py that loads data relative to itself (e.g. sub_folder/data.npy). Then you want to include this in a main figure main_folder/main_figure.py. So I guess the data should be searched in sub_folder/data.npy thats why the code switches temporarily to the sub_folder directory. What is the part that goes wrong here? What other directory should it switch to?
Was a problem with my code and calling the script via a subprocess, sorry for the confusion.
https://github.com/rgerum/pylustrator/blob/cf5a9663124f795c85eff6c5380f366faeeb3b09/pylustrator/helper_functions.py#L214
Changing the filename etc doesn't allow for relative imports of data to plot in the figure. The script then searches for data relative to the composing script, but not the original figure.py.