View unanswered posts | View active topics It is currently Wed May 08, 2024 8:56 am



Reply to topic  [ 5 posts ] 
X-axis equal scaling issue 
Author Message
pChart user
pChart user

Joined: Mon Feb 28, 2011 7:17 pm
Posts: 4
Post X-axis equal scaling issue
Hi, I am having an issue with x-axis scaling. My x-axis is time and I am trying to create a point whenever an event occurs. So for instance 9:00:00, 9:14:00, 12:00:00. What happens though is that my graph ends up divided into three equal sections in the x-axis as if the spacing between point 9:00:00 and 9:14:00 is the same as 9:14:00 and 12:00:00. Ideally, I would like the split the graph up into 1hr increments, and if there is no data then nothing is plotted in that section of the x-axis and if there is a point that occurs at lets say 9:14:00, then it'll draw the point between 9:00:00 and 10:00:00. Any help would be greatly appreciated!

Thanks!


Mon Feb 28, 2011 7:19 pm
Profile
pChart user
pChart user

Joined: Sat Feb 26, 2011 12:10 am
Posts: 5
Post Re: X-axis equal scaling issue
I think you'd have to generate an event for every time increment and fill the ones where you didn't actually have an event with VOID in the series, in order to get what you want.


Tue Mar 01, 2011 4:21 am
Profile
Regular pChart user
Regular pChart user

Joined: Wed Feb 02, 2011 4:52 pm
Posts: 10
Post Re: X-axis equal scaling issue
Maybe you look for a ScatterPlot?


Tue Mar 01, 2011 10:53 am
Profile
pChart user
pChart user

Joined: Mon Feb 28, 2011 7:17 pm
Posts: 4
Post Re: X-axis equal scaling issue
I think a scatter plot is what I may be after... Is there a way to connect the points once I have my nicely scaled scatter plot?

Gizmola, I can't fill in events with void, because an event can occur at any second, so I would have to fill every second between two points with VOID which, I believe, would be very inefficient.


Tue Mar 01, 2011 2:39 pm
Profile
pChart user
pChart user

Joined: Mon Feb 28, 2011 7:17 pm
Posts: 4
Post Re: X-axis equal scaling issue
I've figured out the scatter plot/scatter line bit. One last problem, how do I skip labels?
I've tried using the "LabelSkip"=>x call, but to no avail.

Code:
$AxisBoundaries = array(0=>array("Min"=>7200,"Max"=>32000,"Rows"=>84,"RowHeight"=>300),1=>array("Min"=>-500,"Max"=>500));
 
$ScaleSettings = array("Mode"=>SCALE_MODE_MANUAL,"ManualScale"=>$AxisBoundaries,"DrawSubTicks"=>TRUE);

$Scatter->drawScatterScale($ScaleSettings);


Where should I insert the LabelSkip call? I've tried putting it in both AxisBoundaries and ScaleSettings, but neither works. Thanks!


Tue Mar 01, 2011 5:24 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 10 guests


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 post attachments in this forum

Search for:
Jump to:  
cron