Hi All, im drawing a chart mountain but result image seems to be correct if i got an array with correct number while if i got array with several 0 value, xscale is composed by duplicated 0 and 1 values and also negative values like -0, -1, -2. i would like that my scale start from 0 and values not repeted in xscale. i tried to use option 'start' without any result. package that i'm using is Chart-2.4.1. here is my code.

#!/usr/bin/perl use Chart::Mountain; $filename = $ARGV[0]; $popname = $ARGV[1]; $g = Chart::Mountain->new(1000,500); $g->add_datafile( "$filename", set ); %hash = ( 'title' => 'Video Server Play Daily Hourly Report', 'grid_lines' => 'true', 'misc' => [0,0,0], 'y_label' => 'Numero Streams', 'include_zero' => 'true', 'x_ticks' => 'vertical', 'precision' => '0', @labels = ($popname) ); $g->set (%hash); $g->set('colors' => {'dataset0' => [0,255,0]}); $g->set ('legend_labels' => \@labels); $g->set ('tick_label_font' => (GD::Font->Giant)); $g->set ('title_font' => (GD::Font->Giant)); $g->jpeg ("$filename.jpeg");

In reply to Draw chart by lorenzob

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.