Hi Richard,
thanks for your interest in pgfplots. I'm glad you find it useful.
Concerning your question about label placement: the problem in this case
is that the default ylabel style defines rotations (and possibly shifts
as well). Using 'ylabel style={<options>}' means to /append/ something
to the default styles, i.e. it does /not/ clear the rotation.
The solution for your problem is to redefine the label style rather than
appending something to it.
This can be done using
every axis y label/.style={at={(current axis.above origin)},anchor=south}
instead of
ylabel style={....}
Alternatively, you can use the '*' version and use redefine 'every non
boxed x axis'. For example,
\pgfplotsset{
every non boxed x axis/.style={
xtick align=center,
enlarge x limits=false,
% x axis line style={-stealth}
},
}
would use the predefined styles, but without arrow heads.
Best regards
Christian
Am 31.07.2011 22:49, schrieb Richard Janis Beckert:
> Hello everyone!
>
> First of all: thanks for pgfplots! It's a great tool!
>
> I wanted to have my y axis in the center of my plot without it having
> arrow heads. However, since that does not affect the ylabel, I needed to
> rotate and place it manually. Doing this I seem to have encountered some
> odd behaviour when using \axis y line*=center in conjunction with ylabel
> style to adjust the position of the ylabel. Here is my example (I hope
> it is minimal enough):
>
> \begin{tikzpicture}
> \begin{axis}[
> axis y line*=center,
> axis x line=none,
> ylabel=ylabel,
> xlabel=xlabel,
> xtick=\empty,
> ytick=\empty,
> ylabel style={at={(current axis.above
> origin)},yshift=-4em,rotate=-90}
> ]
> \addplot[mark=none,black] coordinates {
> \end{axis}
> \end{tikzpicture}
>
> If you adjust the yshift key you will see that the ylabel is in fact
> moved in x-direction, not in y-direction (conversely, xshift would move
> the ylabel in y-drection).
>
> Is this maybe a bug? And also: is there an easier way to remove the
> arrow head on a (centered) axis and its label rotated and positioned
> correctly?
>
>
> Cheers,
> Janis
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Pgfplots-features mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pgfplots-features
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Pgfplots-features mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pgfplots-features