in reply to Re: Is it possible to create an interactive scale for palette in GNUplot?
in thread Edited:Using Chart::Gnuplot to creat an interactive scale for palette?

Hi Rolf, So far I have a code that just plots the 2D contour plot. Here is a snippet,
my $chart = Chart::Gnuplot->new( output => "test1.png", title => "3D plot", xlabel => 'x', ylabel => 'y', ); $chart->set(pm3d => 'map'); $chart->set(palette => 'defined (0 0 0 1, 1 1 1 0, 2 1 0 0)'); $chart->set(dgrid3d => '385,385'); my $dataSet = Chart::Gnuplot::DataSet->new( points => \@array, ); $chart->plot3d($dataSet);
This does not have TK gui. But sounds like a good starting point.
  • Comment on Re^2: Is it possible to create an interactive scale for palette in GNUplot?
  • Download Code

Replies are listed 'Best First'.
Re^3: Is it possible to create an interactive scale for palette in GNUplot?
by poj (Abbot) on Mar 05, 2016 at 15:49 UTC
    $chart->set(cbrange => '[-120:120]');

    See gnuplot page 181.

    poj
      Exactly what I was looking for. Thanks! I tried making it a variable based on the users input
      $chart->set(cbrange => '[$x:$y]');
      But it gives me an error "Column number Expected". Any ideas?

        Your variables won't be interpolated inside single quotes. Use doubles

        $chart->set(cbrange => "[$x:$y]");