Variance on a graph

조회 수: 4 (최근 30일)
Laura T
Laura T 2021년 12월 10일
댓글: Michael Van de Graaff 2021년 12월 10일
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
Voss
Voss 2021년 12월 10일
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 2021년 12월 10일
"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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by