🛠️ Setting up gsplot for developer#

This document describes how to set up gsplot for development.

Warning

An admonition note!

Flow of setting up gsplot for development#

  1. Fork the gsplot repository

  2. Clone the forked repository

  3. Create an environment

  4. Draw the test plot

1. Fork the gsplot repository#

2. Clone the forked repository#

git clone xxxx

3.Create an environment#

gsplot provides three ways to create an environment: Poetry, Local, and Docker. You can choose any of them according to your preference.

Important

Ensure you have Poetry installed on your system.

cd gsplot
poetry install
poetry shell

Important

  • Ensure you have pip installed on your system.

  • Ensure you have setuptools installed on your system.

cd gsplot
pip install -e .

Important

Ensure you have docker and X11 installed on your system. For MAC users, you can install XQuartz, and it needs to allow connections from the network in the security settings in order to show an interactive plot.

cd gsplot
docker-composer up -d --build
docker-composer exec gsplot bash
cd opt
poetry shell

4. Draw the test plot#

Our repository has a demo folder that contains a quick start script. You can run the script to draw a test plot.

python demo/test_plot/gsplot_demo.py

After running the script, you will see a plot like this:

SC_cal.png