Re: Problems with new plot widget

"Adrian E. Feiguin" <[email protected]> Thu, 06 Oct 2005 07:16:02 -0700
Newsgroups gmane.comp.scigraphica.gtkextra
Message-ID <[email protected]>
Hi John,

All you have to do is set the tick space and the number of minor ticks 
using gtk_plot_set_ticks, setting the range won't set the tick intervals 
automatically. Good luck.

Saludos,
<ADRIAN>

John Gotts wrote:

>I've ported our program to use the new 1.0.0 plot widget but there appears to
>be problems with the x axis.  First of all, here is the graph, a simple line
>graph with a couple dozen points:
>
>Profit and loss graph: (498.000000, 147732.725344) (499.000000, 159540.962061) (500.000000, 171349.198779) (501.000000, 183157.825496) (502.000000, 194966.062214) (503.000000, 203894.438931) (504.000000, 194368.465649) (505.000000, 184838.992366) (506.000000, 175309.519084) (507.000000, 165783.545802) (508.000000, 156254.072519) (509.000000, 146724.599237) (510.000000, 137195.125954) (511.000000, 127436.712672) (512.000000, 117632.799389) (513.000000, 107832.426107) (514.000000, 98028.512824) (515.000000, 88224.599542) (516.000000, 78424.226260) (517.000000, 68620.312977) (518.000000, 58816.399695) (519.000000, 49016.026412) (520.000000, 39212.113130) (521.000000, 29408.199847) (522.000000, 19604.286565) (523.000000, 9803.913282) (524.000000, 0.000000) (525.000000, -9878.353282) (526.000000, -19953.126565) (527.000000, -30031.479847) (528.000000, -40109.833130) (529.000000, -50188.186412) (530.000000, -60262.959695) (531.000000, -70341.312977) (532.000000, -80419.666260) (53!
> 3.000000, -90494.439542) (534.000000, -100572.792824) (535.000000, -110651.146107) (536.000000, -120725.919389) (537.000000, -130804.272672) (538.000000, -140879.045954) (539.000000, -150957.399237) (540.000000, -161226.592519) (541.000000, -171579.385802) (542.000000, -181928.559084) (543.000000, -192281.352366) (544.000000, -202634.145649) (545.000000, -212983.318931) (546.000000, -223336.112214) (547.000000, -233688.905496) (548.000000, -244038.078779) (549.000000, -254390.872061) (550.000000, -264743.665344)
>
>I set the range using these values:
>
>Range: 492.80 555.20 -311607.48 250758.25
>
>Then I set the ticks using these values:
>
>Set ticks for GTK_PLOT_AXIS_X: 10.40, 0
>Set ticks for GTK_PLOT_AXIS_Y: 93727.62, 0
>
>The result:
>
>http://linuxsavvy.com/plot-tick-bug.jpg
>
>The widget is drawing a ridiculous number of ticks for the x axis, and the
>graph takes several minutes to render on my 2 GHz Athlon processor.  0.99.16
>is so fast you can't measure wall clock time.
>
>All of these values worked fine with 0.99.16.
>
>Just for grins, I tried the [new?] autoscale API, which doesn't work right
>for the x axis, either:
>
>http://linuxsavvy.com/autoscale-glitch.jpg
>
>But autoscale doesn't really suit us, as we need the finer-grained control
>that version 0.99.16 of the plot widget allowed us to have.
>
>I don't want to name names, I suspect these fixes were at fault:
>
>+- Eric Monsler <[email protected]>
>+  Fixes for autoscaling.
>
>John
>
>  
>




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl