Question about combining surf and plot3
Hello all,
I would like to plot a 3D plot in which I plot some scattered 3D points and at the same time I would like to plot surfaces which correspond to the limits of the ranges of my three variables. I attach a .dat file which contains the variables, the variable ‘parameters’ contain the 3D data which to be plotted, they are 500 data points for each of the three variables. The variables p1, p2 and p3 contain the ranges of my three variables, I would like to plot the surfaces which correspond to the limits of these variables, for example for the third variable, this will do the job for the lower limit:
surf(p3(1)*ones(size(parameters,2),size(parameters,2)),’FaceColor’,’r’,’FaceAlpha’,0.3,’EdgeColor’,’none’)
I have a problem which is that after I use the command plot3 to plot the data as follows:
figure(‘units’,’normalized’,’outerposition’,[0 0 1 1])
surf(p3(1)*ones(size(parameters,2),size(parameters,2)),’FaceColor’,’r’,’FaceAlpha’,0.3,’EdgeColor’,’none’)
hold on
plot3(parameters(1,:),parameters(2,:),parameters(3,:),’*r’,’MarkerSize’,15)
hold on
plot3(parameters(1,IDEIM_mu),parameters(2,IDEIM_mu),parameters(3,IDEIM_mu),’ko’,’MarkerSize’,20)
xlim([0.8*p1(1) 1.2*p1(2)]);
ylim([0.8*p2(1) 1.2*p2(2)]);
zlim([0.8*p3(1) 1.2*p3(2)]);
Then the first surface plot disappers. Could you please let me know how I could combine the two kind of plots ? Thanks.Hello all,
I would like to plot a 3D plot in which I plot some scattered 3D points and at the same time I would like to plot surfaces which correspond to the limits of the ranges of my three variables. I attach a .dat file which contains the variables, the variable ‘parameters’ contain the 3D data which to be plotted, they are 500 data points for each of the three variables. The variables p1, p2 and p3 contain the ranges of my three variables, I would like to plot the surfaces which correspond to the limits of these variables, for example for the third variable, this will do the job for the lower limit:
surf(p3(1)*ones(size(parameters,2),size(parameters,2)),’FaceColor’,’r’,’FaceAlpha’,0.3,’EdgeColor’,’none’)
I have a problem which is that after I use the command plot3 to plot the data as follows:
figure(‘units’,’normalized’,’outerposition’,[0 0 1 1])
surf(p3(1)*ones(size(parameters,2),size(parameters,2)),’FaceColor’,’r’,’FaceAlpha’,0.3,’EdgeColor’,’none’)
hold on
plot3(parameters(1,:),parameters(2,:),parameters(3,:),’*r’,’MarkerSize’,15)
hold on
plot3(parameters(1,IDEIM_mu),parameters(2,IDEIM_mu),parameters(3,IDEIM_mu),’ko’,’MarkerSize’,20)
xlim([0.8*p1(1) 1.2*p1(2)]);
ylim([0.8*p2(1) 1.2*p2(2)]);
zlim([0.8*p3(1) 1.2*p3(2)]);
Then the first surface plot disappers. Could you please let me know how I could combine the two kind of plots ? Thanks. Hello all,
I would like to plot a 3D plot in which I plot some scattered 3D points and at the same time I would like to plot surfaces which correspond to the limits of the ranges of my three variables. I attach a .dat file which contains the variables, the variable ‘parameters’ contain the 3D data which to be plotted, they are 500 data points for each of the three variables. The variables p1, p2 and p3 contain the ranges of my three variables, I would like to plot the surfaces which correspond to the limits of these variables, for example for the third variable, this will do the job for the lower limit:
surf(p3(1)*ones(size(parameters,2),size(parameters,2)),’FaceColor’,’r’,’FaceAlpha’,0.3,’EdgeColor’,’none’)
I have a problem which is that after I use the command plot3 to plot the data as follows:
figure(‘units’,’normalized’,’outerposition’,[0 0 1 1])
surf(p3(1)*ones(size(parameters,2),size(parameters,2)),’FaceColor’,’r’,’FaceAlpha’,0.3,’EdgeColor’,’none’)
hold on
plot3(parameters(1,:),parameters(2,:),parameters(3,:),’*r’,’MarkerSize’,15)
hold on
plot3(parameters(1,IDEIM_mu),parameters(2,IDEIM_mu),parameters(3,IDEIM_mu),’ko’,’MarkerSize’,20)
xlim([0.8*p1(1) 1.2*p1(2)]);
ylim([0.8*p2(1) 1.2*p2(2)]);
zlim([0.8*p3(1) 1.2*p3(2)]);
Then the first surface plot disappers. Could you please let me know how I could combine the two kind of plots ? Thanks. plot3, surf MATLAB Answers — New Questions