在Perl中使用Gnuplot使用不同颜色的实线
我正在尝试创建一个包含两个条件的图表:-在Perl中使用Gnuplot使用不同颜色的实线,perl,gnuplot,Perl,Gnuplot,我正在尝试创建一个包含两个条件的图表:- 1) Solid lines 2) Different colors . 以下是我的代码片段:- my $set = Chart::Gnuplot::DataSet->new( xdata => "words", ydata => "bits", title => "wordsvsbits", type => "matrix", font =
1) Solid lines
2) Different colors .
以下是我的代码片段:-
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",
);
当我这样做时,我得到只有一种颜色的实线。如果我不给出线型,
第一行是实线(红色),第二行用不同的颜色虚线,第三行也用新颜色虚线。
在这里,我想为每一行获得新的颜色,但它们都应该是实线。
请帮助我。直到4.6版。这由
set term option solid
控制。在Perl中,这应该与
my $chart = Chart::Gnuplot->new(
termoption => "solid",
);
没有指定
线型
,我尝试了,但仍然得到了相同的结果。1个实线和2个虚线:(您能提供一个完整的、可运行但最小的示例吗?$set=Chart::Gnuplot::DataSet->new(扩展数据=>$xdata,ydata=>$ydata,title=>$key,type=>“matrix”,font=>“arial,20”,width=>7,style=>“linespoint”,imagesize=>“1.5,1.5”注意,您不能将termoption
交给Chart::Gnuplot::Dataset->new
,而是交给Chart::Gnuplot->new
$chart1=Chart::Gnuplot->new(output=>$title.png),termoption=>“solid”,title=>{text=>$xaxis.vs”.$yaxis,font=>“arial,25”,},xlabel=>$xaxis,ylabel=>$yaxis,x2range=>“xxx”xtics=>{mirror=>“off”,},ytics=>{mirror=>“off”,},x2tics=>“on”,y2tics=>“on”,grid=>{type=>“dash”,width=>0,});