Nellina has asked for the wisdom of the Perl Monks concerning the following question:

Hi*, I would create with perl a probability plot with y-axis with labels not linearly scaling. The plotted datas are linear. Scaling rule is almost the following: y=-4.2648 --> label="0.001", y=-3.7191 --> label="0.01", y=-3.0905 --> label="0.1",...,y=0-->label="50", ..., y=1.2817->label="90", as in the template used for xmgrace plot:

@ yaxis tick major 0, -4.2648

@ yaxis ticklabel 0, "0.001"

@ yaxis tick major 1, -4.2648

@ yaxis ticklabel 1, "0.001"

@ yaxis tick major 2, -3.7191

@ yaxis ticklabel 2, "0.01"

@ yaxis tick major 3, -3.0905

@ yaxis ticklabel 3, "0.1"

@ yaxis tick major 4, -2.3268

@ yaxis ticklabel 4, "1"

@ yaxis tick major 5, -1.2817

@ yaxis ticklabel 5, "10"

@ yaxis tick major 6, -1.2817

@ yaxis ticklabel 6, "10"

@ yaxis tick major 7, 0

@ yaxis ticklabel 7, "50"

@ yaxis tick major 8, 0

@ yaxis ticklabel 8, "50"

@ yaxis tick major 9, 1.2817

@ yaxis ticklabel 9, "90"

@ yaxis tick major 10, 2.3268

@ yaxis ticklabel 10, "99"

@ yaxis tick major 11, 3.0905

@ yaxis ticklabel 11, "99.9"

@ yaxis tick major 12, 3.7191

@ yaxis ticklabel 12, "99.99"

@ yaxis tick major 13, 4.265

@ yaxis ticklabel 13, "99.999"

In which way can I get it? Can I use some particular tool or ppm? Thanks in advance, Nellina.
  • Comment on How to plot a graph setting a y axis with labels not linearly scaling

Replies are listed 'Best First'.
Re: How to plot a graph setting a y axis with labels not linearly scaling
by roboticus (Chancellor) on Jan 31, 2011 at 11:23 UTC

    Nellina:

    I'm not familiar with xmgrace, but if you want to control your axes, then you can rescale your data accordingly. Specifically, you can compute a new set of Y values mapping the current values to the scale you're using on your labels. However, you should make sure your data is sane. You have a problem in your current data, as you appear to want -4.2648 to be labelled as 0.001 in two places, and have the same problem with -1.2817.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      My problem is: how can I compute a new set of Y values mapping the current values to the scale I'm using on mylabels? My dataset is right for xmgrace. Obviously I need to arrange it for Perl.
        I have estimated my normal probability distribution, but I have some problems with the graph because I cannot reproduce the usual probability y-scale. I know the math rule for y-axis, but I cannot put the labels (0.001, 0.01,....,99, 99.9) right by the data values using GD::Graph module or perlchartdir package.
Re: How to plot a graph setting a y axis with labels not linearly scaling
by Anonymous Monk on Jan 31, 2011 at 10:50 UTC
A reply falls below the community's threshold of quality. You may see it by logging in.