I've been trying to test GD::Graph and Unicode using a code snippet from
bioportal.weizmann.ac.il but either I'm doing something wrong or GD::Graph does not support Unicode. Hopefully, you can spot my mistake.
use utf8;
use GD::Graph::linespoints;
@data = (
["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
[undef, 52, 53, 54, 55, 56, undef, 58, 59],
[60, 61, 61, undef, 68, 66, 65, 61, undef],
);
$my_graph = new GD::Graph::linespoints( );
$my_graph->set(
x_label => 'X Label',
y_label => 'Y label',
title => 'A Lines and Points Graph',
y_max_value => 80,
y_tick_number => 6,
y_label_skip => 2,
markers => [ 1, 5 ],
);
my $ustring1 = "\x{263A}";
my $ustring2 = "\x{263A}";
$my_graph->set_legend( $ustring1, $ustring2 );
my $gd = $my_graph->plot(\@data);
open(IMG, '>uni.gif') or die $!;
binmode IMG;
print IMG $gd->gif;
close IMG;
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.