Resolve "ActionPlotCorrelations missing ATLAS labels"
Release notes
As soon as the filename ends with .tex
, correlation plots will now be made with PGF/TikZ instead of ROOT.
Details
As these can become quite large, they sometimes need to be compiled with lualatex
to avoid LaTeX running out of memory.
Closes #216 (closed)
Merge request reports
Activity
added [SFramework] [visualization] suggestion + labels
I've created a small mockup example for a pgfplots drawing style:
\documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{colormap={bluewhitered}{color=(blue) color=(white) color=(red)}} \begin{document} \begin{tikzpicture} \begin{axis}[ title=Correlation, colorbar, colormap name={bluewhitered}, point meta min=-1, point meta max=+1, enlargelimits=false, symbolic x coords={parA,parB,parC,parD,parE}, symbolic y coords={parA,parB,parC,parD,parE}, axis on top, x tick label style={rotate=90}, tick style={draw=none} ] \addplot [matrix plot*,point meta=explicit,mesh/cols=5] table [meta=corr] { x y corr parA parA 1. parB parA 0. parC parA 0. parD parA 0. parE parA 0. parA parB 0. parB parB 1. parC parB 0. parD parB 0. parE parB 0. parA parC 0. parB parC 0. parC parC 1. parD parC 0. parE parC 0. parA parD 0. parB parD 0. parC parD 0. parD parD 1. parE parD 0. parA parE 0. parB parE 0. parC parE 0. parD parE 0. parE parE 1. }; \end{axis} \end{tikzpicture} \end{document}
Opinions? test.pdf
Hi @cburgard, I think it looks good. A few thinks that come into my mind (maybe you have already thought of some of this):
- I think an option to have the actual numbers in the entries is useful
- Maybe one could try to add some gridlines, such that it is easier to find the correct number belonging to a pair of NP when the matrix gets large. This is sometimes difficult in the current correlation plots.
- Where do you plan to add the ATLAS label? Maybe one could have a panel at the top for this. Then, there might be enough space to also put more information, e.g. the minimum correlation an NP must have to be shown in the plot.
Hi!
I think an option to have the actual numbers in the entries is useful
What do you mean by this exactly?
Maybe one could try to add some gridlines, such that it is easier to find the correct number belonging to a pair of NP when the matrix gets large. This is sometimes difficult in the current correlation plots.
Do you really think that would help?
Where do you plan to add the ATLAS label? Maybe one could have a panel at the top for this. Then, there might be enough space to also put more information, e.g. the minimum correlation an NP must have to be shown in the plot.
Yes that is exactly what I would suggest.
Here's a revamped version. test.pdf
\documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{colormap={bluewhitered}{color=(blue) color=(white) color=(red)}} \begin{document} \begin{tikzpicture} \begin{axis}[ clip=false, colorbar, colormap name={bluewhitered}, point meta min=-1, point meta max=+1, enlargelimits=false, grid=both, major grid style={draw=none}, minor tick num=1, symbolic x coords={parA,parB,parC,parD,parE}, symbolic y coords={parA,parB,parC,parD,parE}, axis on top, x tick label style={rotate=90}, tick style={draw=none} ] \addplot [matrix plot*,point meta=explicit,mesh/cols=5] table [meta=corr] { x y corr parA parA 1. parB parA 0. parC parA 0. parD parA 0. parE parA 0. parA parB 0. parB parB 1. parC parB 0. parD parB 0. parE parB 0. parA parC 0. parB parC 0. parC parC 1. parD parC 0. parE parC 0. parA parD 0. parB parD 0. parC parD 0. parD parD 1. parE parD 0. parA parE 0. parB parE 0. parC parE 0. parD parE 0. parE parE 1. }; \node[above right,font={\bfseries}] at (rel axis cs:0,1){ATLAS} ; \node[above right] at (rel axis cs:0.25,1){Private}; \node[above left] at (rel axis cs:1,1){Correlations $>0.5$}; \end{axis} \end{tikzpicture} \end{document}
Edited by Carsten BurgardHow about this?
\documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ colormap={bluewhitered}{color=(blue) color=(white) color=(red)}, clip=false, colorbar, colormap name={bluewhitered}, point meta min=-1, point meta max=+1, enlargelimits=false, grid=both, major grid style={draw=none}, nodes near coords, every node near coord/.append style={anchor=center,font=\footnotesize}, minor tick num=1, symbolic x coords={parA,parB,parC,parD,parE}, symbolic y coords={parA,parB,parC,parD,parE}, axis on top, x tick label style={rotate=90}, tick style={draw=none} ] \addplot [matrix plot*,point meta=explicit,mesh/cols=5] table [meta=corr] { x y corr parA parA 1. parB parA 0. parC parA 0. parD parA 0. parE parA 0. parA parB 0. parB parB 1. parC parB 0. parD parB 0. parE parB 0. parA parC 0. parB parC 0. parC parC 1. parD parC 0. parE parC 0. parA parD 0. parB parD 0. parC parD 0. parD parD 1. parE parD 0. parA parE 0. parB parE 0. parC parE 0. parD parE 0. parE parE 1. }; \node[above right,font={\bfseries}] at (rel axis cs:0,1){ATLAS} ; \node[above right] at (rel axis cs:0.25,1){Private}; \node[above left] at (rel axis cs:1,1){Correlations $>0.5$}; \end{axis} \end{tikzpicture} \end{document}
added 2 commits
I just pushed a version. Can you test it? @bejaeger
assigned to @cburgard
could we please also make sure the ROOT based plotting stays and also gets the ATLAS label?
While the lxtex version surely looks better it's also often useful to quickly have a plot just to check the cor mat when debugging a workspace (rather than first compiling it, some clusters don't have latex in their sw stack, so one needs to either mount the filesystem to ones laptop or even download the .tex first)
Hi Ralf!
I totally agree that the ROOT based plotting should stay. If you look at the code I committed, ROOT based plotting is still the default for every file extension except
.tex
.As for the ATLAS label, I have to say that I don't really see the reason why we would add an ATLAS label to the ROOT based plots. The ATLAS label is only needed for plots that go public, which should (by definition) be good-looking, which is precisely what the
tex
plots are for, whereas the ROOT based plots are (as you say) useful for quick debugging, but not particularly pretty and thus unlikely to get published.So, I'd actually vote for providing the ATLAS label exclusively for the
tex
plots in order to make people use them for things that get published, since they look much better and are much easier customizable.Would you agree to this argumentation, or do you still insist on having the ATLAS label for the ROOT based plots - and why?
Hi Carsten,
apologies for the delayed follow-up. I'd like to see the ATLAS label in the ROOT based plots as well even if it's just for consistency sake (thinking from the perspective: I urgently need to get this plot on my slides, now why is that label missing even though I requested it? Debug, debug, debug..... )
Hi, I added the ATLAS label to the ROOT based plot. For the pgf plot I have some concerns, unfortunately. As you mentioned, @cburgard, the standard pdflatex command suffocates when the matrix gets too large. However,
lualatex
is not working either on lxplus (tex version 0.95.0, I get the obscure error below [1]) and only works in principal when I compile with a newer tex version. I say in principal, because it took me 15min for the compilation (doing it locally with a O(200x200) matrix)) and I don't know if this is something we should ask the user to do. Do you know, Carsten, why this is such a difficult task for latex? Essentially, it's just a few (maybe many!) numbers to be put in the right position, I thought...[1]
! Undefined control sequence. \sa@placebox ->\newpage \global \pdfpagewidth =\wd \sa@box \global \pdfpageh... l.3883 \end{tikzpicture}
Edited by Benjamin Paul Jaeger