Skip to content
Snippets Groups Projects
Commit b7dd962f authored by Frank Sauerburger's avatar Frank Sauerburger
Browse files

Use png version of cropped parabola

Create also a png version of the cropped parabola plot and use this version in
the README.
parent e1678418
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -132,7 +132,7 @@ the cropped parabola f(x), which is limited y=4 for x>=2.
```
The final plot should look like this.
!(Plot of cropped parabola)[https://srv.sauerburger.com/esel/FP-python-examples/-/jobs/artifacts/master/raw/cropped_parabola.eps?job=doxec_test]
![Plot of cropped parabola](https://srv.sauerburger.com/esel/FP-python-examples/-/jobs/artifacts/master/raw/cropped_parabola.png?job=doxec_test)
Create the file `func_plot.py` and add the following lines.
......@@ -180,6 +180,12 @@ plt.xlabel("$x$") # latex synatx can be used
plt.ylabel("cropped parabola")
plt.savefig("cropped_parabola.eps")
```
<!-- append func_plot.py
```python
# We need also a png version of the plot to embed it into the README.md.
plt.savefig("cropped_parabola.png")
```
-->
Run your script and check the file `cropped_parabola.eps` is created.
<!-- console -->
......@@ -191,6 +197,8 @@ $ python3 func_plot.py
```
$ ls cropped_parabola.eps
cropped_parabola.eps
$ ls cropped_parabola.png
cropped_parabola.png
```
-->
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment