Trying to generate an SVG for an azimuthal antenna plot from a single column of values in decibels, range -40 up to a fixed maximum of 10. I've got it working, sort of. But the concentric rings for -40, -30 ... +10 are all of evenly spaced diameters. So it doesn't look right compared to the usual way. Normally the outer donut for 0 to +10 is bigger than the next one down for -10 to 0. And so on, each ring getting thinner and thinner as it proceeds down to the innermost circle with a center point of -40 dB.

So this is likely more a math question, except that I'm trying to work it in Perl. Obviously, Perl/Tk does it somehow, since a log scale exists. Has anyone a link to such an example?

Here is a link to what I'm working on. Folder on KY8D.net

foo.n2p.txt is the data. Drop the .txt after download.
foo.svg is the SVG graphic created by Perl.
Nec2Go_Plot.png is the plot I'm trying to prettify.
N2P_to_SVG.txt is the Perl script.

What it's about: There's an older antenna analysis program called Nec2Go. I'm wanting to make its plots suitable for inclusion in magazine articles, etc. So its 1-pixel lines on plots with grey backgrounds just won't do. Otherwise, though, it's better than certain newer ones.


In reply to Logarithmic Scale by aplonis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.