Page 1 of 1

scaling points of a graphic

Posted: Thu Jan 05, 2012 4:30 pm
by adventuresofgreg
Hi: I have a script that plots price data as a bar chart and it is working well, but I am running into some problems with large numbers.

The basic method is simple (shown without the HLOC bar drawing complexities):

mydata:
1,2001
2,2002
3,2008
4,2001

To plot it:
set the points of graphic "existingGraphic" to mydata

To scale the new plot:
set the rect of graphic "existingGraphic" to the rect of graphic "TheFrame"

The problem is when I attempt to plot numbers larger than 5 digits, sometimes the resulting plot is all over the place, sometimes I can plot 6 digits - the problem seems a bit intermittent - perhaps related to the spread between the max and min of myData.

Re: scaling points of a graphic

Posted: Thu Jan 05, 2012 4:37 pm
by adventuresofgreg
I attached a simple plot testing stack to demonstrate the problem. Note when you increase the number in the "Scale amount" field to 3 or higher, the plot starts to look funny

Re: scaling points of a graphic

Posted: Thu Jan 05, 2012 4:40 pm
by adventuresofgreg
the attachment didnt work - how do i attach a livecode file??

Re: scaling points of a graphic

Posted: Thu Jan 05, 2012 4:42 pm
by adventuresofgreg
trying to attach a zip file...