TeX - LaTeX Asked by Matthias Arras on January 9, 2021
I am trying to increase the thickness of my error bars. I found that the stem and the marker needs to be changed individually here. Problem with this is that using /error bars/error mark options={*styles}
I am overwriting the defaults which gives me no marks to begin with. Trying to use /error bars/error mark options/.append style={*styles}
, however, compiles fine but has no effect, neither does .prefix style={*styles}
. What am I missing?
documentclass[]{standalone}
usepackage[]{pgfplots}
pgfplotsset{
error bars/error bar style={opacity=0.7,ultra thick},
error bars/error mark options/.append style={ultra thick,red}} %does nothing
begin{document}
begin{tikzpicture}
begin{axis}[
mystyle/.style={thick,mark=square*,only marks ,error bars/.cd, y dir = both, y explicit}
]
addplot[mystyle] table[x index={0}, y index={1},y error index={2}]
{
0 1 0.5
1 1 0.5
2 1 0.5
};
end{axis}
end{tikzpicture}
end{document}
On another note, I find the design choice of the error bar styles a bit cumbersome in the first place: why is there is no high-level command to change the thickness of the vertical and horizontal portion of the error bars at the same time? But rather they need to be changed individually. Maybe a suggestion, it would be nice to combine more styles and make it the default behaviour to change both by using error bar style
, then make the styles individually accessible via error bar mark options
and error bar stem options
or something of that sort. It’s just my impression, but so far I have seen mostly examples, where the stem and the mark have the same thickness, so that seems to be the default for most people – myself included.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP