Skip to content
Snippets Groups Projects
Commit dc07c99c authored by Hock, Martin's avatar Hock, Martin
Browse files

Adjust code blocks in readme

parent 7dcbd1e5
No related branches found
No related tags found
3 merge requests!12v.0.1 for alpha release,!11Draft: Merge version0.1 changes into dev,!10Version0.1
Pipeline #740126 passed
This commit is part of merge request !11. Comments created here will be created in the context of that merge request.
...@@ -12,10 +12,12 @@ Currently there are two options to run PlotID. Either install it via pip from th ...@@ -12,10 +12,12 @@ Currently there are two options to run PlotID. Either install it via pip from th
### From PyPi with pip ### From PyPi with pip
1. *Optional* Create a virtual environment and activate it: 1. *Optional* Create a virtual environment and activate it:
`pip install venv` ```bash
`mkdir venv` pip install venv
`python3 -m venv` mkdir venv
`source venv/bin/activate` python3 -m venv
source venv/bin/activate
```
2. Install PlotID 2. Install PlotID
`pip install --upgrade --index-url https://test.pypi.org/simple/ example-package-plotid-test` `pip install --upgrade --index-url https://test.pypi.org/simple/ example-package-plotid-test`
...@@ -24,10 +26,12 @@ Currently there are two options to run PlotID. Either install it via pip from th ...@@ -24,10 +26,12 @@ Currently there are two options to run PlotID. Either install it via pip from th
`git clone https://git.rwth-aachen.de/plotid/plotid_python.git` `git clone https://git.rwth-aachen.de/plotid/plotid_python.git`
`cd plotid_python` `cd plotid_python`
2. [Optional] Create a virtual environment: 2. [Optional] Create a virtual environment:
`pip install venv` ```bash
`mkdir venv` pip install venv
`python3 -m venv` mkdir venv
`source venv/bin/activate` python3 -m venv
source venv/bin/activate
```
3. Install dependencies 3. Install dependencies
`pip install -r requirements.txt` `pip install -r requirements.txt`
4. Install PlotID 4. Install PlotID
...@@ -56,10 +60,12 @@ Optional parameters can be used to customize the tag process. ...@@ -56,10 +60,12 @@ Optional parameters can be used to customize the tag process.
Location for ID to be displayed on the plot. Default is 'east'. Location for ID to be displayed on the plot. Default is 'east'.
Example: Example:
```python
FIG1 = plt.figure() FIG1 = plt.figure()
FIG2 = plt.figure() FIG2 = plt.figure()
FIGS_AS_LIST = [FIG1, FIG2] FIGS_AS_LIST = [FIG1, FIG2]
[TAGGED_FIGS, ID] = tagplot(FIGS_AS_LIST, 'matplotlib', prefix='XY23_', id_method='random', location='west') [TAGGED_FIGS, ID] = tagplot(FIGS_AS_LIST, 'matplotlib', prefix='XY23_', id_method='random', location='west')
```
### publish() ### publish()
...@@ -85,10 +91,12 @@ If you want to build PlotID yourself, follow these steps: ...@@ -85,10 +91,12 @@ If you want to build PlotID yourself, follow these steps:
`git clone https://git.rwth-aachen.de/plotid/plotid_python.git` `git clone https://git.rwth-aachen.de/plotid/plotid_python.git`
`cd plotid_python` `cd plotid_python`
2. [Optional] Create a virtual environment: 2. [Optional] Create a virtual environment:
`pip install venv` ```bash
`mkdir venv` pip install venv
`python3 -m venv` mkdir venv
`source venv/bin/activate` python3 -m venv
source venv/bin/activate
```
3. [Optional] Run unittests and coverage: 3. [Optional] Run unittests and coverage:
`python3 tests/runner_tests.py` `python3 tests/runner_tests.py`
4. Build the package 4. Build the package
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment