By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

JPGraph - setting Y axis range and calculating left margin width?

P: n/a
I'm using JPGraph to plot temperature vs. time. Time is given as
timestamps, so I use a callback function to print it as hours and
minutes. Here's the graph and the code:

http://fs.sdsu.edu/kf/vorb/test.php

Because I print the X axis labels (time) at 90 degrees, I have to
manually set the bottom margin, which forces me to set the left margin
too, which used to be automatically set.

My questions:

1. How do I calculate left margin at run time, based on the width of
the Y axis tick labels?
2. I'm setting the X axis scale to go from $t0 to $t1, but why isn't
it ending right on the hour?
3. How do I set the X axis tick intervals to 30 or 60 minute
intervals? (I tried $graph->xaxis->SetTickLabelInterval()).

Thanks.

Feb 23 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
بسم الله الرحمن الرحيم
افضل موقع للتعارف بين الجنس ين الشباب والبنات من كل دول العالم
www.arabzwaj.com

بنات وشباب عايزيين يتعرفوا عليكم
صور عارية حقيقية
تعارف مجاني من كل دول العالم www.arabzwaj.com
for marrige and friend shipافضل تعارف بين الشباب والبنات موقع زواج
مجاني www.arabzwaj.com

www.arabzwaj.com افضل موقع مجاني للتعارف و للزواج الشرعي

www.arabzwaj.com بنات وشباب عايزه تتعرف عليكم

the best web site formarrige and frindship www.arabzwaj.comافضل موقع
مجاني للتعارف و للزواج
Feb 24 '07 #2

P: n/a
2. I'm setting the X axis scale to go from $t0 to $t1, but why isn't
it ending right on the hour?
3. How do I set the X axis tick intervals to 30 or 60 minute
intervals? (I tried $graph->xaxis->SetTickLabelInterval()).
I stumbled upon the answer:
// set major ticks to 60 mins, minor to 15 mins.
$graph->xaxis->ticks->Set( 60*60, 60*15 );

This also fixed the problem of X axis scale not going all the way to
$t1. Not sure why, but it works now after I added the above line.

j.
Feb 24 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.