Mentions légales du service

Skip to content
Snippets Groups Projects
Commit be584edd authored by FELŠÖCI Marek's avatar FELŠÖCI Marek
Browse files

Allow for producing figures interactively

parent 5a9fdff8
No related branches found
No related tags found
No related merge requests found
Pipeline #881247 passed
...@@ -568,16 +568,24 @@ and =low=, on linear systems of different sizes (see Figure [[results-time]]). ...@@ -568,16 +568,24 @@ and =low=, on linear systems of different sizes (see Figure [[results-time]]).
The results clearly show the advantage of using data compression, especially The results clearly show the advantage of using data compression, especially
with increasing size of the target linear system. with increasing size of the target linear system.
#+NAME: get-time-plot
#+HEADER: :noweb yes :exports results :results file graphics
#+HEADER: :file ./figures/results-time.pdf :eval never-export
#+begin_src R
<<code-time>>
#+end_src
#+CAPTION: Computation times of sequential runs of =minisolver= on linear #+CAPTION: Computation times of sequential runs of =minisolver= on linear
#+CAPTION: systems of varying size and using different compression levels. #+CAPTION: systems of varying size and using different compression levels.
#+NAME: results-time #+NAME: results-time
#+ATTR_LaTeX: :width 1\columnwidth #+ATTR_LaTeX: :width 1\columnwidth
[[./figures/results-time.pdf]] #+RESULTS: get-time-plot
[[file:./figures/results-time.pdf]]
**** Plot :noexport: **** Plot :noexport:
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: plot-time :CUSTOM_ID: plot-time
:header-args: :tangle results-time.R :header-args: :tangle results-time.R :noweb-ref code-time
:END: :END:
To plot Figure [[results-time]], we rely on the R language and its graphical To plot Figure [[results-time]], we rely on the R language and its graphical
...@@ -648,11 +656,10 @@ Regarding the plot appearance, we select one of the pre-defined themes, i.e. the ...@@ -648,11 +656,10 @@ Regarding the plot appearance, we select one of the pre-defined themes, i.e. the
theme_bw() theme_bw()
#+end_src #+end_src
At the very end of the script, we produce the plot into a =*.svg= file while At the very end of the script, we produce the plot.
specifying the destination as well as the initial dimensions.
#+begin_src R #+begin_src R
ggsave(file = "figures/results-time.pdf", plot = plot, width = 5, height = 3) print(plot)
#+end_src #+end_src
*** Peak RAM usage *** Peak RAM usage
...@@ -667,16 +674,24 @@ executions of HMAT using two different compression levels, i.e. =high= and ...@@ -667,16 +674,24 @@ executions of HMAT using two different compression levels, i.e. =high= and
the results clearly show the advantage of using data compression, especially the results clearly show the advantage of using data compression, especially
with increasing size of the target linear system. with increasing size of the target linear system.
#+NAME: get-ram-plot
#+HEADER: :noweb yes :exports results :results file graphics
#+HEADER: :file ./figures/results-ram.pdf :eval never-export
#+begin_src R
<<code-ram>>
#+end_src
#+CAPTION: RAM usage peaks of sequential runs of HMAT on linear systems of #+CAPTION: RAM usage peaks of sequential runs of HMAT on linear systems of
#+CAPTION: varying size and using different compression levels. #+CAPTION: varying size and using different compression levels.
#+NAME: results-ram #+NAME: results-ram
#+ATTR_LaTeX: :width 1\columnwidth #+ATTR_LaTeX: :width 1\columnwidth
[[./figures/results-ram.pdf]] #+RESULTS: get-ram-plot
[[file:./figures/results-ram.pdf]]
**** Plot :noexport: **** Plot :noexport:
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: plot-ram :CUSTOM_ID: plot-ram
:header-args: :tangle results-ram.R :header-args: :tangle results-ram.R :noweb-ref code-ram
:END: :END:
To plot Figure [[results-ram]], we use nearly the same R script as in the case To plot Figure [[results-ram]], we use nearly the same R script as in the case
...@@ -705,12 +720,7 @@ scale_color_manual( ...@@ -705,12 +720,7 @@ scale_color_manual(
values = c("high" = "#F07E26", "low" = "#9B004F") values = c("high" = "#F07E26", "low" = "#9B004F")
) + ) +
theme_bw() theme_bw()
#+end_src print(plot)
The destination file name changes too, of course.
#+begin_src R
ggsave(file = "figures/results-ram.pdf", plot = plot, width = 5, height = 3)
#+end_src #+end_src
* Conclusion * Conclusion
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment