schymans / ESSM_plotting

Python modules to simplify plotting of equations generated using ESSM
GNU General Public License v3.0
0 stars 0 forks source link

ESSM_plotting

Author: Stanislaus J. Schymanski*

Luxembourg Institute of Science and Technology, Environmental Research and Innovation Department

*stanislaus.schymanski@list.lu

Copyright © 2023 Luxembourg Institute of Science and Technology. All Rights Reserved.

The code in this repository is distributed under the terms of the GNU General Public License 3.0 or any later version, unless stated otherwise. All other material is licensed under a Creative Commons Attribution 4.0 International license, unless stated otherwise.

General purpose

This repository contains python scripts to plot symbolic expressions generated using the Python package ESSM.

To use the functions in the file plotting.py within a Jupyter notebook, clone this repo as a submodule into the one where your jupyter notbook resides (e.g. git submodule add https://github.com/schymans/ESSM_plotting.git ESSM_plotting), then provide the relative path to the repo (e.g. ../ESSM_plotting/ and import the desired function:

import imp
path_plotting = '../ESSM_plotting/plotting.py`

# Importing plotting function
mod = imp.load_source('plotting', path_plotting)
plot_expr2 = getattr(mod, 'plot_expr2')

If you would like to import the functions e.g. into a project residing in renkulab.io, execute in the parent folder of your renkulab project:

mkdir modules
renku dataset create --datadir modules/ESSM_plotting ESSM_plotting
renku --no-external-storage dataset add ESSM_plotting --source '*' git@github.com:schymans/ESSM_plotting.git

This will save the contents in modules/ESSM_plotting.