Author |
Topic  |
|
cougar2
Germany
Posts |
Posted - 01/06/2004 : 04:08:17 AM
|
Hi everyone,
I am plotting several 2d graphs each in one layer. The graphs need to match in x,y at their beginning and their end which they usually don´t because of certain difficulties in the measurement. Now, I can get around this by just scaling each layer differently so that I get the desired matching. Question: Is there any way to do a calculation on the data plots so that I get the matching without scaling? This would come in handy because I think then I could automate this procedure. Just adding or multiplying by a constant doesn´t do because then I can only mathc the beginning and not the end (or vice versa). Also, I would like to make a 3d plot out of those different 2d graphs and in 3d I cannot scale each layer differently, so a calculation would be preferably. I hope this problem isn´t too specific.
Cougar |
|
edgar.kaiser
Switzerland
29 Posts |
Posted - 01/06/2004 : 06:25:14 AM
|
Hi Cougar,
in a case like this you should consider to normalize your data. For example normalize your x data to an interval between z1 and z2:
Let x1i be the left end of your x-scale and x2i be the right end of the x-scale of dataset i. Perform the following transformations on all your n datasets:
Subtract x1i-z1 from all x values in dataset i. This transforms the left end to z1. x' = x - (x1i - z1)
To transform the right end to z2, do the following transformation to the resulting values x'. x'' = z1 + (x' - z1)*(z2 - z1)/(x2i - x1i)
Do the equivalent thing for the y-data.
For convenience normalizing is often performed with z1 = 0 ans z2 = 1. But this depends on your preferences.
Please note that the transformation will be different for the individual n datasets.
Hope this will help.
Regards,
Edgar
|
 |
|
cougar2
Germany
Posts |
Posted - 01/06/2004 : 07:45:45 AM
|
Hi Edgar,
thank you very much for your answer, it works very well.
Cougar |
 |
|
|
Topic  |
|
|
|