How can I resize one line to match another line with different values?

  • Context: MHB 
  • Thread starter Thread starter xNICK1
  • Start date Start date
Click For Summary
SUMMARY

This discussion focuses on the mathematical transformation required to overlay two graphs with different value ranges. Specifically, it addresses the need to resize values from Graph 2 (G2), which ranges from 0 to 1, to match the scale of Graph 1 (G1), which ranges from 0 to 100. The formula derived for this transformation is: y = 100 * (G2 value - G2 lowest) / (G2 highest - G2 lowest), allowing users to convert G2 values to the G1 scale accurately. The example provided demonstrates how a G2 value of 0.3 corresponds to a G1 value of 30.

PREREQUISITES
  • Understanding of Cartesian coordinates and graphing concepts
  • Basic knowledge of linear transformations in mathematics
  • Familiarity with mathematical notation and functions
  • Ability to interpret and manipulate equations
NEXT STEPS
  • Research linear transformations in mathematics
  • Learn about scaling functions in data visualization tools
  • Explore graph overlay techniques in software like Matplotlib or Excel
  • Study interpolation methods for data mapping
USEFUL FOR

Data analysts, mathematicians, and anyone involved in data visualization who needs to overlay graphs with differing value ranges effectively.

xNICK1
Messages
14
Reaction score
0
Hey, I need to re size one line so it matches the second line. So Line 1's highest point is 100 and its lowest point is 0. Line 2's highest point is 1 and its lowest point is 0. Line 1 is currently at 30 and line 2 is currently at .7, how could I re size line 2 to be between 0 and 100 instead of 0 and 1 so that line 2 would then be at 70 not .7. This is just a simple example, but I am sure there is a formula for this i just can figure it out myself. Thanks for your time and help!
 
Mathematics news on Phys.org
You'll have to be much more detailed in order to explain the problem properly.

xNICK said:
So Line 1's highest point is 100 and its lowest point is 0.
What do you mean by the line here? A sine wave? What do you mean that the highest point is 100? Namely, how can a point be a number?

xNICK said:
Line 1 is currently at 30
What does this mean? A line is presumably an infinite set of points, and you can't specify even a single point with a single number.

xNICK said:
how could I re size line 2
What exactly do you mean by resizing?
 
Sorry for the confusion, I have 2 different graphs, graph1's highest is 100 and lowest is 0, then graph2's highest is 1 and lowest is 0. I want to overlay both these graphs on the same graph. So if i put graph2 onto graph1, when graph2 goes to .3 its then 30 on graph1 instead of being .3? Does that make better since? Thanks again.
 
xNICK said:
how could I re size line 2 to be between 0 and 100 instead of 0 and 1
If the Cartesian equation of the second line (curve) is $y=f(x)$, change it to $y=100\cdot f(x)$.
 
Olinguito said:
If the Cartesian equation of the second line (curve) is $y=f(x)$, change it to $y=100\cdot f(x)$.


I don't know what that means, but this is what I was looking for.
Graph1==G1
Highest==100
Lowest==0
Current line == 70

Graph2==G2
Highest==1
Lowest==0
Current line == .3

So to put graph2 onto graph1, I would take (G2 line ".3" - G2 lowest "0") / (G2 Highest "1" - G2 lowest "0")=.3 so X==.3,
then (((G1 highest "100" - G1 lowest "0") * X ) + G1 Lowest "0") = 30. So I re sized my line on g2 at .3 to be on g1 at 30.
No idea what this formula is called if anyone knows. I made it from this formula xp=x1+p(x2-x1).
Thanks for all the help! Sorry I probably didnt explain it well enough. Let me know if it make since now ? Thanks again!
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
1
Views
1K
Replies
10
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K