huzefa52 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I want to create heat map in perl. For that i am using Chart::Gnuplot library. Below is my code when i am running this code it is giving me error saying "undefined variable: noenhanced". Can anyone help me on this or can suggest me good library to create heat map.
#!/usr/bin/perl #use strict; use Chart::Gnuplot; # Create the chart object my $chart = Chart::Gnuplot->new( output => "plot3d_10.png", title => "A heat map", view => 'map', isosamples => 60, ); # Data set object my $dataSet = Chart::Gnuplot::DataSet->new( func => "-(x**2 + y**2)", style => 'pm3d', ); # Plot the graph $chart->plot3d($dataSet);

Replies are listed 'Best First'.
Re: How to create heat map in perl
by daxim (Curate) on Sep 03, 2013 at 14:21 UTC
    Works for me: Chart-Gnuplot 0.20 and gnuplot 4.6.1

    Update - try:

    title => { text => "A heat map", enhanced => 0, },
Re: How to create heat map in perl
by VinsWorldcom (Prior) on Sep 03, 2013 at 15:40 UTC

    Works for me too on Windows 7 x64 with Strawberry Perl 5.16.1 and GnuPlot 4.4 patchlevel 3. I did need to add two options to get the Windows version to work:

    [...] my $chart = Chart::Gnuplot->new( gnuplot => 'c:/usr/bin/gnuplot.bat', # req'd for Win32 terminal => 'png', # req'd for Win32 [...]