Plot with 3 Variables
Show older comments
I have a table with 3 variables that I would like to put into a plot. I have variable X that I want on the X-axis, variable Y that I want on the Y-axis, and then a third variable titled 'Activity'. Is it possible to plot the X and Y as normal and add the third variable through color coding with a key? I'm open to other ideas as well! Thanks in advance!
Accepted Answer
More Answers (1)
Image Analyst
on 5 Jul 2021
Sure
plot(t.X, t.Y, 'b.-'); % t is your table variable.
Not sure what the third variable is or how you want it to appear on the x-y graph. Please explain and attach your table in a .mat file
save('answers.mat', 'yourTable');
Categories
Find more on Graphics Performance 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!
