Re: [pgfplots-features] polaraxis with negative domain (y radius)
Hi Béatrice,
in order to shift the coordinates into the positive domain, you can use "y coord trafo/.code=\pgfmathparse{#1+30}". In order for PGFplots to use the original coordinates for the labels, simply specify the inverse transformation as a shift back into the negative: "y coord inv trafo/.code=\pgfmathparse{#1-30}". To let the x labels go from -180 to +180, you could just set "xmin=-180,xmax=180". This will, however flip the y axis to the left hand side of the plot, and the "-180/+180" coordinate will be printed twice. For better control over the tick labels, you can set "xtick={0,30,...,360}, xticklabels={0,30,...,180,-150,-120,...,0}". This tells PGFplots to generate tick marks at all position starting from 0, going up in increments of 30, ending at 360. The tick labels start at 0, go up in increments of 30 until they reach 180, then start again at -150, going up in increments of 30, ending at 0.
Here's the complete example, a PDF of the output is attached.
Jürnjakob
\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\begin{document}
\begin{tikzpicture}
\begin{polaraxis}[
xtick={0,30,...,360},
xticklabels={0,30,...,180,-150,-120,...,0},
y coord trafo/.code=\pgfmathparse{#1+30},
y coord inv trafo/.code=\pgfmathparse{#1-30}
]
\addplot [no markers, thick] table{data} \closedcycle;
\end{polaraxis}
\end{tikzpicture}
\end{document}
2012/1/13 Augereau Béatrice
<augereau.bea-cBm5OqgzVeIUrb4e85K3Fw@public.gmane.org>Hi,
thanks for your answer.
To be precise my goal is to obtain a graphic like the one in attached
file (test.pdf) which results from gnuplot with the tikz terminal and
the complete data (in attached file too). I dislike this solution
because I have to place direction labels by hand and they're useful for
one graphic size. That's why I want to find a solution with pgfplots. Do
you think it's possible ?
Best regards,
Béatrice.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@...
https://lists.sourceforge.net/lists/listinfo/pgfplots-features