From: Gerardo Rivera <Gerardo.Rivera@jp...>  20061031 00:29:55

Hi, I'm trying to draw a line given an angle, magnitude, x0 and y0 location on a 2d line plot. I use the "cosine" and "sine" to find the x1 and y1 locations so that I can draw a line segment from x0, y0 to x1, y1. This works fine on a 200 x 200 (Width x Height) pixel graph. However, I have an input form where the user can change the plot size, for example 200x800 or 800x200. The "magnitude" is along the yaxis and "time" is along the xaxis. At a particular point in time the magnitude and angle is given and I have to calculate the x1 and y1 values. The max magnitude along the yaxis (height) is always the same whether it is 200 pixels in height or 800 pixels in height. The scientist I'm working with wants to see the magnitude (x1,y1) of each plot look correct if the graph is 800 pixels or 200 pixels in height. He also wants the correct angle if you stretch the graph from 200 pixels wide to 800 pixels wide and then down to 100 pixels wide. I've been trying to use a ratio of the graph size to maintain the correct sizing but with no luck. Basically, the scientist want to maintain the same angle and reduce or increase the magnitude in the yaxis if the graph height is reduced or increased. Does anyone have an answer to this solution? Maintaining the same angle and varying the magnitude based on the yaxis height. Since, I have a lot of points I started to use a LineCollection to speed the rendering speed. Gerardo 