Skip to content

Commit ff78755

Browse files
committed
It now works the same at NSC as the others, except PDC. Changing to reflext that
1 parent 32a4d91 commit ff78755

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

docs/day3/batch-new.rst

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ In both cases the codes need to be rewritten (more or less), depending on what i
588588
plt.scatter(x, y)
589589
plt.show()
590590
591-
- At UPPMAX, HPC2N, LUNARC, and C3SE
591+
- At UPPMAX, HPC2N, LUNARC, C3SE, and NSC
592592

593593
.. code-block:: python
594594
@@ -602,23 +602,6 @@ In both cases the codes need to be rewritten (more or less), depending on what i
602602
plt.scatter(x, y)
603603
plt.show()
604604
605-
- At NSC
606-
607-
There is a problem with the Tkinter and matplotlib version causing the backend not to work for GUI so you cannot do graphics except saving it to a file and opening it afterwards (with ``eog`` for instance, if you have logged in with ``-X`` or ``-Y``). You can use this script to save it to a file:
608-
609-
.. code-block:: python
610-
611-
import pandas as pd
612-
import matplotlib
613-
import matplotlib.pyplot as plt
614-
matplotlib.use('Agg')
615-
dataframe = pd.read_csv("scottish_hills.csv")
616-
x = dataframe.Height
617-
y = dataframe.Latitude
618-
plt.scatter(x, y)
619-
plt.savefig("myplot.png")
620-
621-
622605
**CHALLENGE: How would you do it so you could run as a batch script?**
623606

624607
- Hint: The main difference is that here we cannot open the plot directly, but have to save to a file instead, for instance with ``plt.savefig("myplot.png")``.

0 commit comments

Comments
 (0)