Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Image_Graph line weight question
July 9, 2008, 4:56 am
rate this thread
I've been putting together a line graph in Image_Graph. And I can't
seem to find an answer to change the layout of few things.
Here is my graph: http://www.goldreads.com/test.png
1) I'm trying to bold the line.
2) I would also like to make the title bold...
3) I want to include a text inside the graph in the right corner
I would appreciate if anyone knows the answer.
Here is my code:
$Canvas =& Image_Canvas::factory('png', array('width' => 172, 'height'
=> 114, 'antialias' => false));
$Graph =& Image_Graph::factory('graph', $Canvas);
//$Graph =& Image_Graph::factory('graph', array(172, 114));
$Font =& $Graph->addNew('ttf_font', 'Arial');
// set the font size to 15 pixels
$Title = Image_Graph::factory('title', array('Dow/Gold Ratio:
$Plotarea = Image_Graph::factory('plotarea'),
$Legend = Image_Graph::factory('title', array('Jul
08, 2008 18:16 EST', 8)),
//$Plotarea =& $Graph->addNew('plotarea', array('axis','axis'));
$Dataset =& Image_Graph::factory('dataset');
$Plotarea->addNew('line_grid', false, IMAGE_GRAPH_AXIS_X);
$Plotarea->addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y);
$Plot =& $Plotarea->addNew('smooth_line', array(&$Dataset));
//$Plot->setTitle('Daily Dow/Gold Ratio');
$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X);
$Graph->done(array('filename' => 'test.png'));
Re: Image_Graph line weight question
Image_Graph doesn't look like it's being developed any more. The last
release was an alpha version over two years ago, there is virtual no
documentation and it has unassigned bugs almost three years ago.
I doubt anyone else is using it - and I sure wouldn't, especially for
I'd suggest you check out other packages. jpgraph comes to mind, but
I'm sure there are others.
Remove the "x" from my email address
JDS Computer Training Corp.