Present the function values varies with three arguments with one figure [duplicate]How to plot a 3D plot in MATLAB?How can I plot a function with two variables in octave or matlab?Stacking several 2D images into 3D in MatlabHow can I create a rectangle with an outlined border?data flow visualisation with real-time dataDisplaying trace of data vs time with “band of uncertainity”Constructing a bubble trellis plot with lattice in RPlotting contours without transitions in matlabBuilding a hollow cube and filing it with small cubes in MATLABGraphically represent density of iterationsIs controlling the colors in contourf possible?Using OpenGL together with Qt Data Visualization
What do you do if you have developments on your paper during the long peer review process?
Did Apollo carry and use WD40?
How to ask a man to not take up more than one seat on public transport while avoiding conflict?
Is there any reason nowadays to use a neon indicator lamp instead of an LED?
Can this word order be rearranged?
Is it possible to encode a message in such a way that can only be read by someone or something capable of seeing into the very near future?
Hilbert's hotel, why can't I repeat it infinitely many times?
Would Taiwan and China's dispute be solved if Taiwan gave up being the Republic of China?
How use custom order in folder on Windows 7 and 10
What benefits does the Power Word Kill spell have?
In a folk jam session, when asked which key my non-transposing chromatic instrument (like a violin) is in, what do I answer?
Social leper versus social leopard
Way of the bicycle
Is it right to extend flaps only in the white arc?
I reverse the source code, you negate the input!
Leaving a job that I just took based on false promise of a raise. What do I tell future interviewers?
What is the need of methods like GET and POST in the HTTP protocol?
Can Northern Ireland's border issue be solved by repartition?
What is this utensil for?
Find missing number in the transformation
An Algorithm Which Schedules Your Life
How to manage expenditure when billing cycles and paycheck cycles are not aligned?
Should I complain to HR about being mocked for request I made
Cut a cake into 3 equal portions with only a knife
Present the function values varies with three arguments with one figure [duplicate]
How to plot a 3D plot in MATLAB?How can I plot a function with two variables in octave or matlab?Stacking several 2D images into 3D in MatlabHow can I create a rectangle with an outlined border?data flow visualisation with real-time dataDisplaying trace of data vs time with “band of uncertainity”Constructing a bubble trellis plot with lattice in RPlotting contours without transitions in matlabBuilding a hollow cube and filing it with small cubes in MATLABGraphically represent density of iterationsIs controlling the colors in contourf possible?Using OpenGL together with Qt Data Visualization
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
This question already has an answer here:
How to plot a 3D plot in MATLAB?
2 answers
I want to clarify the relationship between the function and its three arguments through one figure, such as y=f(a,b,c), where y varies with three arguments a,b,c.
But it seems impossible. Is there any good solution to this problem? Or other reasonable method to visualize the relationship well?
I wonder if I can draw a 3-D figure with three axises a,b,c, and use the color depth to represent the function value. Can this be realized?
matlab 3d data-visualization matlab-figure
marked as duplicate by gnovice
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 28 at 16:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
show 3 more comments
This question already has an answer here:
How to plot a 3D plot in MATLAB?
2 answers
I want to clarify the relationship between the function and its three arguments through one figure, such as y=f(a,b,c), where y varies with three arguments a,b,c.
But it seems impossible. Is there any good solution to this problem? Or other reasonable method to visualize the relationship well?
I wonder if I can draw a 3-D figure with three axises a,b,c, and use the color depth to represent the function value. Can this be realized?
matlab 3d data-visualization matlab-figure
marked as duplicate by gnovice
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 28 at 16:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Are you asking how to plot a function of 3 variables? Like this?
– gnovice
Mar 28 at 16:15
Welcome to StackOverflow. A minimal example, your example code, and a description of what you're wanting specifically will get you a lot more help. See how to ask
– SecretAgentMan
Mar 28 at 16:16
Have you looked at these approaches complete with code? For example, using scatter3 with different marker types or colors would allow you to visualize 4–5 variables depending on your specific application.
– SecretAgentMan
Mar 28 at 16:16
@SecretAgentMan Thanks. Indeed, these methods may not work, since what I need can be viewed as a 4-D figure.
– Land
Mar 28 at 16:23
@gnovice. Thank you. Yes, it can be 4-D figure. It seems helpful. Thanks again!
– Land
Mar 28 at 16:25
|
show 3 more comments
This question already has an answer here:
How to plot a 3D plot in MATLAB?
2 answers
I want to clarify the relationship between the function and its three arguments through one figure, such as y=f(a,b,c), where y varies with three arguments a,b,c.
But it seems impossible. Is there any good solution to this problem? Or other reasonable method to visualize the relationship well?
I wonder if I can draw a 3-D figure with three axises a,b,c, and use the color depth to represent the function value. Can this be realized?
matlab 3d data-visualization matlab-figure
This question already has an answer here:
How to plot a 3D plot in MATLAB?
2 answers
I want to clarify the relationship between the function and its three arguments through one figure, such as y=f(a,b,c), where y varies with three arguments a,b,c.
But it seems impossible. Is there any good solution to this problem? Or other reasonable method to visualize the relationship well?
I wonder if I can draw a 3-D figure with three axises a,b,c, and use the color depth to represent the function value. Can this be realized?
This question already has an answer here:
How to plot a 3D plot in MATLAB?
2 answers
matlab 3d data-visualization matlab-figure
matlab 3d data-visualization matlab-figure
edited Mar 28 at 16:54
SecretAgentMan
1,5833 gold badges9 silver badges25 bronze badges
1,5833 gold badges9 silver badges25 bronze badges
asked Mar 28 at 15:50
LandLand
34 bronze badges
34 bronze badges
marked as duplicate by gnovice
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 28 at 16:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by gnovice
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 28 at 16:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by gnovice
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 28 at 16:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Are you asking how to plot a function of 3 variables? Like this?
– gnovice
Mar 28 at 16:15
Welcome to StackOverflow. A minimal example, your example code, and a description of what you're wanting specifically will get you a lot more help. See how to ask
– SecretAgentMan
Mar 28 at 16:16
Have you looked at these approaches complete with code? For example, using scatter3 with different marker types or colors would allow you to visualize 4–5 variables depending on your specific application.
– SecretAgentMan
Mar 28 at 16:16
@SecretAgentMan Thanks. Indeed, these methods may not work, since what I need can be viewed as a 4-D figure.
– Land
Mar 28 at 16:23
@gnovice. Thank you. Yes, it can be 4-D figure. It seems helpful. Thanks again!
– Land
Mar 28 at 16:25
|
show 3 more comments
Are you asking how to plot a function of 3 variables? Like this?
– gnovice
Mar 28 at 16:15
Welcome to StackOverflow. A minimal example, your example code, and a description of what you're wanting specifically will get you a lot more help. See how to ask
– SecretAgentMan
Mar 28 at 16:16
Have you looked at these approaches complete with code? For example, using scatter3 with different marker types or colors would allow you to visualize 4–5 variables depending on your specific application.
– SecretAgentMan
Mar 28 at 16:16
@SecretAgentMan Thanks. Indeed, these methods may not work, since what I need can be viewed as a 4-D figure.
– Land
Mar 28 at 16:23
@gnovice. Thank you. Yes, it can be 4-D figure. It seems helpful. Thanks again!
– Land
Mar 28 at 16:25
Are you asking how to plot a function of 3 variables? Like this?
– gnovice
Mar 28 at 16:15
Are you asking how to plot a function of 3 variables? Like this?
– gnovice
Mar 28 at 16:15
Welcome to StackOverflow. A minimal example, your example code, and a description of what you're wanting specifically will get you a lot more help. See how to ask
– SecretAgentMan
Mar 28 at 16:16
Welcome to StackOverflow. A minimal example, your example code, and a description of what you're wanting specifically will get you a lot more help. See how to ask
– SecretAgentMan
Mar 28 at 16:16
Have you looked at these approaches complete with code? For example, using scatter3 with different marker types or colors would allow you to visualize 4–5 variables depending on your specific application.
– SecretAgentMan
Mar 28 at 16:16
Have you looked at these approaches complete with code? For example, using scatter3 with different marker types or colors would allow you to visualize 4–5 variables depending on your specific application.
– SecretAgentMan
Mar 28 at 16:16
@SecretAgentMan Thanks. Indeed, these methods may not work, since what I need can be viewed as a 4-D figure.
– Land
Mar 28 at 16:23
@SecretAgentMan Thanks. Indeed, these methods may not work, since what I need can be viewed as a 4-D figure.
– Land
Mar 28 at 16:23
@gnovice. Thank you. Yes, it can be 4-D figure. It seems helpful. Thanks again!
– Land
Mar 28 at 16:25
@gnovice. Thank you. Yes, it can be 4-D figure. It seems helpful. Thanks again!
– Land
Mar 28 at 16:25
|
show 3 more comments
1 Answer
1
active
oldest
votes
This is an example of using scatter3
to plot multiple variables. Changing marker type adds more functionality. Notice we still haven't made use of the S
(marker size) argument in scatter3(X,Y,Z,S,C)
.
However, this may not be a good visualization for some applications. Some other resources listed below.
% MATLAB R2017a
n = 50;
X = 10*rand(n,1);
Y = 15*rand(n,1);
Z = 20*rand(n,1);
V = 100*rand(n,1);
idxA = X + Y > 15;
idxB = ~idxA;
colormap(cmap), hold on, box on
p(1) = scatter3(X(idxA),Y(idxA),Z(idxA),[],V(idxA),'filled');
p(2) = scatter3(X(idxB),Y(idxB),Z(idxB),[],V(idxB),'filled');
p(2).Marker = 'd';
cb = colorbar;
view([-5 -2 -2])
p(1).MarkerEdgeColor = 'k';
p(2).MarkerEdgeColor = 'k';
xlabel('X')
ylabel('Y')
zlabel('Z')
cb.Label.String = 'V';
Other resources:
This post with 3D and 4D solutions. Future visitors may find this post valuable as well due to its many examples complete with code.
MATLAB references:
MATLAB Plot Types
MATLAB Plot Gallery
Thank you! Can we use line to connect these scatters?
– Land
Mar 28 at 16:40
Since it is in 3D, you mean something likesurface
orsurf
?
– SecretAgentMan
Mar 28 at 16:48
Yes. Since they are discrete, it will be a little difficult to get the varing trendency.
– Land
Mar 28 at 16:53
Have you looked at 'ribbon' or 'plot3' ("LineSpec" property set to'-'
)?
– SecretAgentMan
Mar 28 at 17:06
I don't see why you couldn't plot the point markers over top one of the other plots. So, yes, I think that's possible if that's the question.
– SecretAgentMan
Mar 28 at 17:09
add a comment
|
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is an example of using scatter3
to plot multiple variables. Changing marker type adds more functionality. Notice we still haven't made use of the S
(marker size) argument in scatter3(X,Y,Z,S,C)
.
However, this may not be a good visualization for some applications. Some other resources listed below.
% MATLAB R2017a
n = 50;
X = 10*rand(n,1);
Y = 15*rand(n,1);
Z = 20*rand(n,1);
V = 100*rand(n,1);
idxA = X + Y > 15;
idxB = ~idxA;
colormap(cmap), hold on, box on
p(1) = scatter3(X(idxA),Y(idxA),Z(idxA),[],V(idxA),'filled');
p(2) = scatter3(X(idxB),Y(idxB),Z(idxB),[],V(idxB),'filled');
p(2).Marker = 'd';
cb = colorbar;
view([-5 -2 -2])
p(1).MarkerEdgeColor = 'k';
p(2).MarkerEdgeColor = 'k';
xlabel('X')
ylabel('Y')
zlabel('Z')
cb.Label.String = 'V';
Other resources:
This post with 3D and 4D solutions. Future visitors may find this post valuable as well due to its many examples complete with code.
MATLAB references:
MATLAB Plot Types
MATLAB Plot Gallery
Thank you! Can we use line to connect these scatters?
– Land
Mar 28 at 16:40
Since it is in 3D, you mean something likesurface
orsurf
?
– SecretAgentMan
Mar 28 at 16:48
Yes. Since they are discrete, it will be a little difficult to get the varing trendency.
– Land
Mar 28 at 16:53
Have you looked at 'ribbon' or 'plot3' ("LineSpec" property set to'-'
)?
– SecretAgentMan
Mar 28 at 17:06
I don't see why you couldn't plot the point markers over top one of the other plots. So, yes, I think that's possible if that's the question.
– SecretAgentMan
Mar 28 at 17:09
add a comment
|
This is an example of using scatter3
to plot multiple variables. Changing marker type adds more functionality. Notice we still haven't made use of the S
(marker size) argument in scatter3(X,Y,Z,S,C)
.
However, this may not be a good visualization for some applications. Some other resources listed below.
% MATLAB R2017a
n = 50;
X = 10*rand(n,1);
Y = 15*rand(n,1);
Z = 20*rand(n,1);
V = 100*rand(n,1);
idxA = X + Y > 15;
idxB = ~idxA;
colormap(cmap), hold on, box on
p(1) = scatter3(X(idxA),Y(idxA),Z(idxA),[],V(idxA),'filled');
p(2) = scatter3(X(idxB),Y(idxB),Z(idxB),[],V(idxB),'filled');
p(2).Marker = 'd';
cb = colorbar;
view([-5 -2 -2])
p(1).MarkerEdgeColor = 'k';
p(2).MarkerEdgeColor = 'k';
xlabel('X')
ylabel('Y')
zlabel('Z')
cb.Label.String = 'V';
Other resources:
This post with 3D and 4D solutions. Future visitors may find this post valuable as well due to its many examples complete with code.
MATLAB references:
MATLAB Plot Types
MATLAB Plot Gallery
Thank you! Can we use line to connect these scatters?
– Land
Mar 28 at 16:40
Since it is in 3D, you mean something likesurface
orsurf
?
– SecretAgentMan
Mar 28 at 16:48
Yes. Since they are discrete, it will be a little difficult to get the varing trendency.
– Land
Mar 28 at 16:53
Have you looked at 'ribbon' or 'plot3' ("LineSpec" property set to'-'
)?
– SecretAgentMan
Mar 28 at 17:06
I don't see why you couldn't plot the point markers over top one of the other plots. So, yes, I think that's possible if that's the question.
– SecretAgentMan
Mar 28 at 17:09
add a comment
|
This is an example of using scatter3
to plot multiple variables. Changing marker type adds more functionality. Notice we still haven't made use of the S
(marker size) argument in scatter3(X,Y,Z,S,C)
.
However, this may not be a good visualization for some applications. Some other resources listed below.
% MATLAB R2017a
n = 50;
X = 10*rand(n,1);
Y = 15*rand(n,1);
Z = 20*rand(n,1);
V = 100*rand(n,1);
idxA = X + Y > 15;
idxB = ~idxA;
colormap(cmap), hold on, box on
p(1) = scatter3(X(idxA),Y(idxA),Z(idxA),[],V(idxA),'filled');
p(2) = scatter3(X(idxB),Y(idxB),Z(idxB),[],V(idxB),'filled');
p(2).Marker = 'd';
cb = colorbar;
view([-5 -2 -2])
p(1).MarkerEdgeColor = 'k';
p(2).MarkerEdgeColor = 'k';
xlabel('X')
ylabel('Y')
zlabel('Z')
cb.Label.String = 'V';
Other resources:
This post with 3D and 4D solutions. Future visitors may find this post valuable as well due to its many examples complete with code.
MATLAB references:
MATLAB Plot Types
MATLAB Plot Gallery
This is an example of using scatter3
to plot multiple variables. Changing marker type adds more functionality. Notice we still haven't made use of the S
(marker size) argument in scatter3(X,Y,Z,S,C)
.
However, this may not be a good visualization for some applications. Some other resources listed below.
% MATLAB R2017a
n = 50;
X = 10*rand(n,1);
Y = 15*rand(n,1);
Z = 20*rand(n,1);
V = 100*rand(n,1);
idxA = X + Y > 15;
idxB = ~idxA;
colormap(cmap), hold on, box on
p(1) = scatter3(X(idxA),Y(idxA),Z(idxA),[],V(idxA),'filled');
p(2) = scatter3(X(idxB),Y(idxB),Z(idxB),[],V(idxB),'filled');
p(2).Marker = 'd';
cb = colorbar;
view([-5 -2 -2])
p(1).MarkerEdgeColor = 'k';
p(2).MarkerEdgeColor = 'k';
xlabel('X')
ylabel('Y')
zlabel('Z')
cb.Label.String = 'V';
Other resources:
This post with 3D and 4D solutions. Future visitors may find this post valuable as well due to its many examples complete with code.
MATLAB references:
MATLAB Plot Types
MATLAB Plot Gallery
edited Mar 28 at 16:52
answered Mar 28 at 16:34
SecretAgentManSecretAgentMan
1,5833 gold badges9 silver badges25 bronze badges
1,5833 gold badges9 silver badges25 bronze badges
Thank you! Can we use line to connect these scatters?
– Land
Mar 28 at 16:40
Since it is in 3D, you mean something likesurface
orsurf
?
– SecretAgentMan
Mar 28 at 16:48
Yes. Since they are discrete, it will be a little difficult to get the varing trendency.
– Land
Mar 28 at 16:53
Have you looked at 'ribbon' or 'plot3' ("LineSpec" property set to'-'
)?
– SecretAgentMan
Mar 28 at 17:06
I don't see why you couldn't plot the point markers over top one of the other plots. So, yes, I think that's possible if that's the question.
– SecretAgentMan
Mar 28 at 17:09
add a comment
|
Thank you! Can we use line to connect these scatters?
– Land
Mar 28 at 16:40
Since it is in 3D, you mean something likesurface
orsurf
?
– SecretAgentMan
Mar 28 at 16:48
Yes. Since they are discrete, it will be a little difficult to get the varing trendency.
– Land
Mar 28 at 16:53
Have you looked at 'ribbon' or 'plot3' ("LineSpec" property set to'-'
)?
– SecretAgentMan
Mar 28 at 17:06
I don't see why you couldn't plot the point markers over top one of the other plots. So, yes, I think that's possible if that's the question.
– SecretAgentMan
Mar 28 at 17:09
Thank you! Can we use line to connect these scatters?
– Land
Mar 28 at 16:40
Thank you! Can we use line to connect these scatters?
– Land
Mar 28 at 16:40
Since it is in 3D, you mean something like
surface
or surf
?– SecretAgentMan
Mar 28 at 16:48
Since it is in 3D, you mean something like
surface
or surf
?– SecretAgentMan
Mar 28 at 16:48
Yes. Since they are discrete, it will be a little difficult to get the varing trendency.
– Land
Mar 28 at 16:53
Yes. Since they are discrete, it will be a little difficult to get the varing trendency.
– Land
Mar 28 at 16:53
Have you looked at 'ribbon' or 'plot3' ("LineSpec" property set to
'-'
)?– SecretAgentMan
Mar 28 at 17:06
Have you looked at 'ribbon' or 'plot3' ("LineSpec" property set to
'-'
)?– SecretAgentMan
Mar 28 at 17:06
I don't see why you couldn't plot the point markers over top one of the other plots. So, yes, I think that's possible if that's the question.
– SecretAgentMan
Mar 28 at 17:09
I don't see why you couldn't plot the point markers over top one of the other plots. So, yes, I think that's possible if that's the question.
– SecretAgentMan
Mar 28 at 17:09
add a comment
|
Are you asking how to plot a function of 3 variables? Like this?
– gnovice
Mar 28 at 16:15
Welcome to StackOverflow. A minimal example, your example code, and a description of what you're wanting specifically will get you a lot more help. See how to ask
– SecretAgentMan
Mar 28 at 16:16
Have you looked at these approaches complete with code? For example, using scatter3 with different marker types or colors would allow you to visualize 4–5 variables depending on your specific application.
– SecretAgentMan
Mar 28 at 16:16
@SecretAgentMan Thanks. Indeed, these methods may not work, since what I need can be viewed as a 4-D figure.
– Land
Mar 28 at 16:23
@gnovice. Thank you. Yes, it can be 4-D figure. It seems helpful. Thanks again!
– Land
Mar 28 at 16:25