简体   繁体   English

在Perl中使用Gnuplot用不同颜色的实线

[英]Solid Lines with Different colors using Gnuplot in Perl

I am trying to create a chart with two conditions :- 我正在尝试创建具有两个条件的图表:

1) Solid lines 
2) Different colors .

Here is my code snippet :- 这是我的代码片段:-

my $set = Chart::Gnuplot::DataSet->new(
        xdata => "words",
        ydata => "bits",
        title => "wordsvsbits",
        type => "matrix",
        font => "arial, 20",
        width => 7,
        style => "linespoints",
        linetype => "solid",
        imagesize  => "1.5,1.5",
        );

When i do this , I get solid lines with only one colour . 当我这样做时,我得到的实线只有一种颜色。 If I dont give linetype , 1st line is a solid (Red color), 2nd line is dashed with different color and 3rd line is also dashed with a new color . 如果我不提供线型,则第一行是纯色(红色),第二行用不同的颜色划线,第三行也用新的颜色划线。 Here I want to get new color for each line , but they should all be solid lines . 在这里,我想为每条线获取新颜色,但是它们都应该是实线。 Kindly , please help me . 请帮助我。

Until version 4.6. 直到4.6版。 this is controlled by set termoption solid . 这由set termoption solid控制。 In Perl this should work with 在Perl中,这应该与

my $chart = Chart::Gnuplot->new(
    termoption => "solid",
);

and without specifying the linetype . 并且不指定linetype

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM