How to plot a second graph instead of color-coding
Show older comments
Hello everyone,
i just started with my master thesis and i already am in trouble with my capability/understanding of matlab.
The thing is, i have a trajectory on a surface of a planet/moon whatever (a .mat with the time, and the coordinates. Then i have some .mat with time and the measurement at that time.
I am able to plot this as a color coded trajectory (using the measurement and the coordinates) in scatter(). This works awesomely nice.
However my problem is that i need something more sophisticated. I now need to take the trajectory and instead of color-coding it, i am supposed to add the graph (value) of the measurement (which is given for each point) to the trajectory (which is not always a straight line). I will added a little sketch to explain what i want. The red arrow shows what i want to add to my plot and the green shows what i have.
I would be really thankful for any kind of suggestion or help!

Accepted Answer
More Answers (2)
Walter Roberson
on 27 Dec 2012
1 vote
You need to do a rotation (and possibly a translation as well) on your (x,y) data. Possibly the easiest way to do that would be to create the plot line in a hggroup and then do a hgtransform to do the rotation and translation.
1 Comment
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!