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.
scaling points of a graphic
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
Re: scaling points of a graphic
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
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
Re: scaling points of a graphic
the attachment didnt work - how do i attach a livecode file??
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
Re: scaling points of a graphic
trying to attach a zip file...
- Attachments
-
- PlotTester.livecode.zip
- Plot tester
- (10.9 KiB) Downloaded 248 times