Variance on a graph

4 Ansichten (letzte 30 Tage)
Laura T
Laura T am 10 Dez. 2021
Hi Guys,
I am trying to plot the axis that has the greatest variance ontop of a graph i have previously coded for (eg from figure 1) as a new graph (eg figure 2). How do i do this?
And to plot an axis that is perpendicular to this axis ive just added?
  2 Kommentare
Voss
Voss am 10 Dez. 2021
If you have done all the calculations already and need to know how to make a new figure to plot in, you can use the figure function:
figure(); % create a new figure window
% plot(x,y) % plot your stuff in the new figure window
I'm not sure what you have in mind for an axis that is perpendicular to another axis.
Perhaps some code you've tried (and some explanation about why it doesn't produce what you want) and/or a picture for reference (e.g., an image from the web or wherever of something similar to what you want to see) may help to clarify what you're looking for.
Michael Van de Graaff
Michael Van de Graaff am 10 Dez. 2021
"I am trying to plot the axis that has the greatest variance...." I don't know what this means. presumably you do though, so i'll just assume you have some data you're trying to plot on an axes.
So now I proceed "I am trying to plot [data] ontop of a graph i have previously coded for" Ok, so you add some data to an exist plot, you must use hold() to preserve the already existing data.
Proceeding: "i'm trying to plot [data] ontop of a preexisting plot in figure 1 as a new plot in figure 2"..... what? are you trying to add data to a plot that already exists? if so then... that's not making a new figure, why are we discussing a new figure? I can't ansswer the question of how do you do this because I have no idea what you're trying to do.
"And to plot an axis that is perpendicular to this axis i've just added" I'm starting to think you have a plot with X and Y axes, and you want to add a third axis Z and have those two plots share the X axis or something?
I think Benjamin's suggestion for some code and an idea of what you want the result to look like would be helpful

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by