PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
diagram with two lines

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Images
View previous topic :: View next topic  
Author Message
fanouss



Joined: 05 Aug 2008
Posts: 1

PostPosted: Tue Aug 05, 2008 9:14 am    Post subject: diagram with two lines Reply with quote

Hello,

I would like to create a diagram with two lines. The problem is, each line has different values on the x axis.

for example:

Code:

$Dataset1 =& Image_Graph::factory('dataset');
$Dataset1->addpoint(10, 1);
$Dataset1->addpoint(12, 3);
$Dataset1->addpoint(14, 5);
$Plot1 =& $Plotarea->addNew('line', array(&$Dataset1));

and:
Code:

$Dataset2 =& Image_Graph::factory('dataset');
$Dataset2->addpoint(11, 2);
$Dataset2->addpoint(13, 4);
$Dataset2->addpoint(15, 6);
$Plot2 =& $Plotarea->addNew('line', array(&$Dataset2));


I get the values on the x axis exactly in the order as in the code: 10, 12, 14, 11, 13, 15. But the two lines should be parallel too each other and the X-values should be set in ascending order on the x axis.

How can I solve this problem? Thanks for your help.

Greetings

F.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Images All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement