[Graph-dev] Xmgrace.pm: problems with options for line

Benjamin Breu breu at bioinformatik.uni-frankfurt.de
Fri Nov 26 05:48:03 PST 2004


Hello,

I need a little advise from people you have used the xmgrace module for perl.

I have a problem with the formatting of the format of the lines of the XY
graph output.

I'm using perl 5.8.5 and the 2.0 xmgrace.pm module from CPAN.

I can see a graph in the output but there are lines in the output, where
 there should be none! Setting the line type and line style to none does not
 change the appearence of the graph plotted. (The graph I produced is
 attached to this mail)

Here is the code I am using: (that's nearly the code from the examples from
http://www.enstimac.fr/Perl/perl5.6.1/site_perl/5.6.1/Chart/Graph/Xmgrace.htm
l#examples ) The code to change the color of the lines and the style is
 marked bold pink!

#!/usr/bin/perl -w
	# Include modules
  use Chart::Graph::Xmgrace qw(xmgrace);

	my @x = (1,2,3,4,5,6,7,8,9,10);
  xmgrace( { "title" => "Example of a XYZFDS Chart",
             "subtitle" =>"optional subtitle",
             "type of graph" => "XY chart",
             "output type" => "png",
             "output file" => "xmgrace1.png",
             "x-axis label" => "my x-axis label",
             "y-axis label" => "my y-axis label",
             "logscale y" => "1",
             "xtics" => [ ["one", "1"], ["two", "2"], ["three", "3"] ],
             "ytics" => [ ["one", "1"], ["two", "2"], ["three", "3"] ],
             "grace output file" => "xmgrace1.agr"
           },

           [ { "title" => "XY presentation data1",
               "set presentation" => "Bar graph",
               "options" => {
                          "symbol" => {
                                        "symbol type" => "6",
                                        "color" => "1",
                                        "fill pattern" => "1",
                                        "fill color" => "1",
                                       },
                           "fill" => {
                                      "type" => "0",
                                     }
                          },
               "data format" => "matrix",
             },

             [ [1,2],
               [2,4],
               [3,6],
               [4,8],
               [5,10],
               [6,12],
               [7,14],
               [8,16],
               [9,18],
               [10,20] ]
           ],

           [ { "title" => "XY presentation data2",
               "options" => {
                           "line" => {
                                      "type" => "0",
                                      "color" => "5",
                                     },
                           "symbol" => {
                                        "symbol type" => "1",
                                        "color" => "1",
					"size" => "2.3",
                                        "fill pattern" => "3",
                                        "fill color" => "7",
                                       },
                           "fill" => {
                                      "type" => "0",
                                     }
                          },
               "data format" => "columns",
             },
             [
              \@x,
              [3,6,9,12,15,18,21,24,27,30],
             ]
           ]

       );

I hope anyone of you can help me change the style of the lines.
If one needs to have more information to help, please do not hesitate to
ask. :-)

Best regards
Benjamin Breu

-----
Diploma Student Bioinformatics
University of Frankfurt

-------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmgrace.png
Type: image/png
Size: 5275 bytes
Desc: not available
Url : http://rommie.caida.org/pipermail/graph-dev/attachments/20041126/07d56cf0/xmgrace.png


More information about the Graph-dev mailing list