[Graph-dev] problems with data_set_options

Martin Willensdorfer m.willensd at web.de
Wed May 21 17:53:24 PDT 2003


Hi all!!

I guess the data_set_options do not work. The following perldoc example:

#!/usr/bin/perl -w
# Include modules
use Chart::Graph::Xmgrace qw(xmgrace);
xmgrace( { "title" => "Example of a XY 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" => "XY",
	     "options" =>  {
		 "line" => {
		     "type" => "1",
		     "color" => "8",
		     "linewidth" => "1",
		     "linestyle" => "3",
		 },
		 "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" => "2",
		     "color" => "4",
		 },
		 "symbol" => {
		     "symbol type" => "1",
		     "color" => "1",
		     "fill pattern" => "3",
		     "fill color" => "5",
		 },
		 "fill" => {
		     "type" => "0",
		 }
	     },
	     "data format" => "columns",
	 },
	   [
	    [1,2,3,4,5,6,7,8,9,10],
	    [3,6,9,12,15,18,21,24,27,30],
	    ]  
           ],
	 [ { "title" => "BAR presentation data3",
	     "set presentation" => "BAR",
	     "data format" => "file"}, "sample"],
	 );

__END__

was not able to produce a xmgrace file with the proper set options. Instead I get:

 > tail -50 xmgrace1.agr
@    legend box fill color 0
@    legend box fill pattern 1
@    legend font 0
@    legend char size 1.000000
@    legend color 1
@    legend length 4
@    legend vgap 1
@    legend hgap 1
@    legend invert false
@    frame type 0
@    frame linestyle 1
@    frame linewidth 1.0
@    frame color 1
@    frame pattern 1
@    frame background color 0
@    frame background pattern 0
@ target G0.S0
@ type XY
                1               2
                2               4
                3               6
                4               8
                5               10
                6               12
                7               14
                8               16
                9               18
                10              20
&
@ target G0.S1
@ type XY
                1               3
                2               6
                3               9
                4               12
                5               15
                6               18
                7               21
                8               24
                9               27
                10              30
&
@ target G0.S2
@ type BAR
                                0.1
                                0.04
                                0.02
                                0.01
                                0.004
&


and, consequently, a pretty lame graph with a black and a red line and the BAR-graph in green. (no symbols etc. ... see attachment). I am using the current CPAN Chart::Graph::Xmgrace version, Grace-5.1.5 and perl v5.6.1 on a Suse 8.0.

Any suggestions??

Best regards,

Martin


______________________________________________________________________________
UNICEF bittet um Spenden für die Kinder im Irak! Hier online an
UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmgrace1.png
Type: image/png
Size: 5611 bytes
Desc: not available
Url : http://login.caida.org/pipermail/graph-dev/attachments/20030521/6cc0e15a/xmgrace1.png


More information about the Graph-dev mailing list