Not The ASP it's the Maths

# Thread: Not The ASP it's the Maths

1. Senior Member
Join Date
Dec 1969
Posts
701

## Not The ASP it's the Maths

I&#039;m figuring out how to plot a graph on the fly, I have managed to create the scale on the and the x values are fine, it&#039;s the variable Y value of the graph I&#039;m having a problem with, here&#039;s what it is, I&#039;ll give an example I&#039;m working on.<BR><BR>The lowest Y value on the graph is 225<BR>the Lowest point on the graph (the point at 225) is \$0.33<BR>Each pixel is worth \$0.015<BR><BR>How can I make it so that if the value is 0.33 it will plot the Y coordinate at 225, at \$1.00 it will plot at 180 etc etc...<BR><BR>Any ideas? my brain is beginning to hurt, and I&#039;ve been through so many different ways I&#039;m not even sure I&#039;ve got enough info anymore?!?

2. Member
Join Date
Dec 1969
Posts
79

## Does this work?

y = 225 - Int((value-.33)/.015)

3. Senior Member
Join Date
Dec 1969
Posts
16,931

## Slightlt OT.

How are you generating the graph? Investigated VML?<BR><BR>Craig.

4. Senior Member
Join Date
Dec 1969
Posts
701

## RE: Slightlt OT.

Wow I think you may have it, I&#039;ll have to test it a little more, but it seems to work! I&#039;m generating the graph using Vectors (SVG).<BR><BR>Thanks for the help, I really appreciate it

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•