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.

Hi,

thanks for your request!

I am not completely sure what you expect... I understand that you want 
polar axes, and from your gnuplot example I see that the origin should 
have y=-30 and the outermost line 0. If I take you data and provide it 
to gnuplot as such, it also seems to provide a similar output as 
pgfplots - but gnuplot seems to have it rotated somehow.

Nevertheless, the label transformations seem to be possible by means of 
custom transformations, perhaps

\documentclass{article}

\usepackage{pgfplots}
\usepgfplotslibrary{polar}

\begin{document}

\begin{tikzpicture}
     \begin{polaraxis}[
         x coord trafo/.code=\pgfmathparse{-#1},
         y coord trafo/.code=\pgfmathparse{-#1},
         y coord inv trafo/.code=\pgfmathparse{-30+#1},
     ]
     \addplot table{
     0 00
     -1 00
     -2 -01
     -3 -02
     -4 -04
     -5 -07
     -337 -22
     -338 -24
     -339 -30
     -340 -30
     -357 -02
     -358 -01
     -359 00
     };
     \end{polaraxis}
\end{tikzpicture}
\end{document}

I have attached the output of this run as png.

Perhaps you can this as starting point to derive a suitable 
transformation. The inverse transformation is *only* used to generate 
tick numbers, so it might not be that important (because you could 
specify tick labels and positions explicitly).

Best regards

Christian



Am 09.01.2012 14:06, schrieb Augereau Béatrice:
> Hi,
>
> I am trying to set the polaraxis environment to perform an antenna
> radiation pattern graphic. The data are in degree and dB (so the y range
> is -30:0).
>
> I did that with theses gnuplot code :
>       set polar
>       set angle degrees
>       set size square
>       set grid polar
>       unset key
>       set trange [-pi:pi]
>       set rrange [-30:0]
>       set yrange [-30:30]
>       set xrange [-30:30]
>       set xtics axis nomirror
>       unset ytics
>       unset border
>       # {\312} degree symbol in postscript
>       set label "0{\312}" at 27,1
>       set label rotate by 30 "30{\312}" at 22,14
>       set label rotate by 60 "60{\312}" at 12,23
>       ...
>       set label rotate by -30 "-30{\312}" at 22.5,-12
>       set term postscript eps enhanced mono size 8cm,8cm "Helvetica" 11
>       set output "graphic.eps"
>       plot "radiation_pattern.dat" w l lw 2
>
> The coordinates are in a file with the index 0 is the x (degree) and the
> index 1 is the y (radius) and are like this :
>       0 00
>       -1 00
>       -2 -01
>       -3 -02
>       -4 -04
>       -5 -07
>       ...
>       -337 -22
>       -338 -24
>       -339 -30
>       -340 -30
>       ...
>       -357 -02
>       -358 -01
>       -359 00
>
> Do you think it's possible to plot a such graphic with pgfplots and how to do 
> this ?
>
> Thanks,
>
> Béatrice.
>
>
>
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> Pgfplots-features mailing list
> Pgfplots-features@...
> https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Attachment: test.pdf
Description: Adobe PDF document

0 00
-1 00
-2 -01
-3 -02
-4 -04
-5 -07
-6 -11
-7 -15
-8 -16
-9 -14
-10 -13
-11 -13
-12 -15
-13 -19
-14 -25
-15 -26
-16 -18
-17 -16
-18 -15
-19 -15
-20 -16
-21 -19
-22 -26
-23 -30
-24 -25
-25 -21
-26 -18
-27 -18
-28 -18
-29 -20
-30 -22
-31 -23
-32 -21
-33 -19
-34 -17
-35 -16
-36 -15
-37 -15
-38 -16
-39 -16
-40 -18
-41 -20
-42 -22
-43 -26
-44 -30
-45 -30
-46 -30
-47 -30
-48 -30
-49 -30
-50 -30
-51 -30
-52 -30
-53 -30
-54 -30
-55 -30
-56 -30
-57 -30
-58 -30
-59 -29
-60 -28
-61 -28
-62 -28
-63 -28
-64 -29
-65 -29
-66 -30
-67 -30
-68 -30
-69 -30
-70 -30
-71 -30
-72 -30
-73 -30
-74 -30
-75 -30
-76 -30
-77 -30
-78 -30
-79 -30
-80 -30
-81 -30
-82 -30
-83 -30
-84 -30
-85 -30
-86 -30
-87 -30
-88 -30
-89 -30
-90 -30
-91 -30
-92 -30
-93 -30
-94 -30
-95 -30
-96 -30
-97 -30
-98 -30
-99 -30
-100 -30
-101 -30
-102 -30
-103 -30
-104 -30
-105 -30
-106 -30
-107 -30
-108 -30
-109 -30
-110 -30
-111 -30
-112 -30
-113 -30
-114 -30
-115 -30
-116 -30
-117 -30
-118 -30
-119 -30
-120 -30
-121 -30
-122 -30
-123 -30
-124 -30
-125 -30
-126 -30
-127 -30
-128 -30
-129 -30
-130 -30
-131 -30
-132 -30
-133 -30
-134 -30
-135 -30
-136 -30
-137 -30
-138 -30
-139 -30
-140 -30
-141 -30
-142 -30
-143 -30
-144 -30
-145 -30
-146 -30
-147 -30
-148 -30
-149 -30
-150 -30
-151 -30
-152 -30
-153 -30
-154 -30
-155 -30
-156 -30
-157 -30
-158 -30
-159 -30
-160 -30
-161 -30
-162 -30
-163 -30
-164 -30
-165 -30
-166 -30
-167 -30
-168 -30
-169 -30
-170 -30
-171 -30
-172 -30
-173 -30
-174 -30
-175 -30
-176 -30
-177 -30
-178 -30
-179 -30
-180 -30
-181 -30
-182 -30
-183 -30
-184 -30
-185 -30
-186 -30
-187 -30
-188 -30
-189 -30
-190 -30
-191 -30
-192 -30
-193 -30
-194 -30
-195 -30
-196 -30
-197 -30
-198 -30
-199 -30
-200 -30
-201 -30
-202 -30
-203 -30
-204 -30
-205 -30
-206 -30
-207 -30
-208 -30
-209 -30
-210 -30
-211 -30
-212 -30
-213 -30
-214 -30
-215 -30
-216 -30
-217 -30
-218 -30
-219 -30
-220 -30
-221 -30
-222 -30
-223 -30
-224 -30
-225 -30
-226 -30
-227 -30
-228 -30
-229 -30
-230 -30
-231 -30
-232 -30
-233 -30
-234 -30
-235 -30
-236 -30
-237 -30
-238 -30
-239 -30
-240 -30
-241 -30
-242 -30
-243 -30
-244 -30
-245 -30
-246 -30
-247 -30
-248 -30
-249 -30
-250 -30
-251 -30
-252 -30
-253 -30
-254 -30
-255 -30
-256 -30
-257 -30
-258 -30
-259 -30
-260 -30
-261 -30
-262 -30
-263 -30
-264 -30
-265 -30
-266 -30
-267 -30
-268 -30
-269 -30
-270 -30
-271 -30
-272 -30
-273 -30
-274 -30
-275 -30
-276 -30
-277 -30
-278 -30
-279 -30
-280 -30
-281 -30
-282 -30
-283 -30
-284 -30
-285 -30
-286 -30
-287 -30
-288 -30
-289 -30
-290 -30
-291 -30
-292 -30
-293 -30
-294 -30
-295 -30
-296 -30
-297 -30
-298 -30
-299 -30
-300 -30
-301 -30
-302 -28
-303 -27
-304 -26
-305 -26
-306 -26
-307 -27
-308 -28
-309 -30
-310 -30
-311 -30
-312 -27
-313 -24
-314 -22
-315 -20
-316 -19
-317 -19
-318 -19
-319 -20
-320 -20
-321 -21
-322 -22
-323 -22
-324 -21
-325 -20
-326 -20
-327 -20
-328 -20
-329 -22
-330 -24
-331 -27
-332 -28
-333 -25
-334 -22
-335 -21
-336 -21
-337 -22
-338 -24
-339 -30
-340 -30
-341 -27
-342 -25
-343 -22
-344 -22
-345 -23
-346 -27
-347 -30
-348 -30
-349 -28
-350 -27
-351 -25
-352 -19
-353 -13
-354 -09
-355 -06
-356 -03
-357 -02
-358 -01
-359 00
------------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to