How many template of 3D graph exist in Matlab ?
조회 수: 5 (최근 30일)
이전 댓글 표시
As we know there is a lot template for sketch the 3D graph in matlab like real imaginary absolute and contour and density and so on how we can gether them in one package any one have it?
댓글 수: 0
답변 (3개)
dpb
2024년 10월 5일
I don't know what is meant, specifically, with the reference to the data classes; particularly imaginary as MATLAB grpahics don't display imaginary values at all, but probably the best compendium of the available graphs is in the <base documentation link to 2D and 3D graphs>. The others available in extended toolboxes are not gathered in any one place that I'm aware of although a number are overloaded functions that will operate on various specialty axes (like mapping) or handle specific subject areas.
It is difficult as the universe keeps expanding to have any idea of all that are available, indeed, agreed...
댓글 수: 10
John D'Errico
2024년 10월 6일
편집: John D'Errico
2024년 10월 6일
NO. I am not trying to destroy your morale. Instead I am telling you there are no templates of the kind you are searching for. At best, there is one (or more) line in the help of each function.
help plot3
For example, in the help for plot3, you will find some basic calling sequences, where if you follow them, they will yield a valid result.
plot3(X,Y,Z)
plot3(X,Y,Z,LineSpec)
plot3(X1,Y1,Z1,...,Xn,Yn,Zn)
plot3(X1,Y1,Z1,LineSpec1,...,Xn,Yn,Zn,LineSpecn)
It is not that we do not wish to share a template with you. There are no templates that you can just click on and get the result you desire to see. MATLAB is not Excel. As I said, if you need to use MATLAB, then you need to read the help. In there, you will find examples of how to call the codes. And that is as close as we can come.
dpb
2024년 10월 6일
@salim saeed, <TECPLOT, an alternative plotting package> does have many other prepackaged forms; although I doubt even it has precisely the above. It, however, is not inexpensive, either.
dpb
2024년 10월 6일
편집: dpb
2024년 10월 6일
And, to hopefully get your morale/optimism back up; it may not be nearly as much effort to create something like or close to the examples as you may think...
Z = peaks; % draw a surface w/ contours
sc = surfc(Z);
hold on % let add more w/o erasing
hAx=axes('Position',[0.7 0.7 0.25 0.20]); % another axis overlaying this one
hL=plot(hAx,Z(:,fix(width(Z)/2)),'linewidth',2); % draw a line into it of the data
xlim([0 50]), xticks([0:10:50]) % neaten it up a little...
ylabel(hAx,'Magnitude')
The rest will be created by using a subplot or tiledlayout arranged to place a matrix of axes in a given figure, it may be necessary to use the venerable subplot() here because I don't think you can put the second axis on top of another one in the tiledlayout--I think I recall having tried that and discovering it doesn't allow it.
The other plot could be as simple as
figure
hP=pcolor(Z);
hP.EdgeColor='none';
and then enhancements...
Don't let the need to write a few MATLAB commands overwhelm you...start in and try something...
댓글 수: 3
Bruno Luong
2024년 10월 7일
@dpb possibly using GUIDE or AppDesigner to place the axes, a step forward to a so called "template"
Walter Roberson
2024년 10월 7일
편집: Walter Roberson
2024년 10월 7일
How many template of 3D graph exist in Matlab ?
No templates of 3D graphs exist in MATLAB.
No templates of 2D graphs exist in MATLAB either.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!