How many template of 3D graph exist in Matlab ?

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?

Answers (3)

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 Comments

salim
salim on 5 Oct 2024
Edited: salim on 5 Oct 2024
@dpb Thanks for answering, How i can plot something like that just by puting a function on a template and determine the range , so there is a lot of tamplate which i am looking for collect them and use them in the futur
Yep. Many tools in MATLAB that produce figures, in a large and growing variety of forms. Some in different packages, different toolboxes. That is especially so if we consider 2-d. But even if we stick to 3-d, there is no complete list of everything specific to 3-d graphics only.
help graph3d
Three dimensional graphs. Elementary 3-D plots. plot3 - Plot lines and points in 3-D space. mesh - 3-D mesh surface. surf - 3-D colored surface. fill3 - Filled 3-D polygons. Color control. colormap - Color look-up table. caxis - Pseudocolor axis scaling. shading - Color shading mode. hidden - Mesh hidden line removal mode. brighten - Brighten or darken colormap. colordef - Set color defaults. graymon - Set graphics defaults for gray-scale monitors. cmpermute - Rearrange colors in colormap. cmunique - Eliminate unneeded colors in colormap of indexed image. imapprox - Approximate indexed image by one with fewer colors. Lighting. surfl - 3-D shaded surface with lighting. lighting - Lighting mode. material - Material reflectance mode. specular - Specular reflectance. diffuse - Diffuse reflectance. surfnorm - Surface normals. Transparency. alpha - Transparency (alpha) mode. alphamap - Transparency (alpha) look-up table. alim - Transparency (alpha) scaling Axis control. axis - Control axis scaling and appearance. zoom - Zoom in and out on a 2-D plot. grid - Grid lines. box - Axis box. hold - Hold current graph. axes - Create axes in arbitrary positions. subplot - Create axes in tiled positions. daspect - Data aspect ratio. pbaspect - Plot box aspect ratio. xlim - X limits. ylim - Y limits. zlim - Z limits. Viewpoint control. view - 3-D graph viewpoint specification. viewmtx - View transformation matrix. rotate3d - Interactively rotate view of 3-D plot. Camera control. campos - Camera position. camtarget - Camera target. camva - Camera view angle. camup - Camera up vector. camproj - Camera projection. High level camera control. camorbit - Orbit camera. campan - Pan camera. camdolly - Dolly camera. camzoom - Zoom camera. camroll - Roll camera. camlookat - Move camera and target to view specified objects. cameratoolbar - Interactively manipulate camera. High level light control. camlight - Creates or sets position of a light. lightangle - Spherical position of a light. Graph annotation. title - Graph title. xlabel - X-axis label. ylabel - Y-axis label. zlabel - Z-axis label. text - Text annotation. gtext - Mouse placement of text. plotedit - Experimental graph editing and annotation tools. Hardcopy and printing. print - Print graph or Simulink system; or save graph to MATLAB file. printopt - Printer defaults. orient - Set paper orientation. See also GRAPH2D, SPECGRAPH.
So there are some graphic "primitives", things like plot3, mesh, surf, fill, patch, fill3. Pretty much everything else will be just an eventual call to some primitive.
To that we can add tools like fsurf, and isosurface, which are just extensions of surf. Tools like scatter3, so extensions of plot3. We can find many of those extensions in specgraph.
help specgraph
Specialized graphs. Specialized 2-D graphs. area - Filled area plot. bar - Bar graph. barh - Horizontal bar graph. binscatter - Binned scatter plot. boxchart - Boxplot chart. comet - Comet-like trajectory. compass - Compass plot. errorbar - Error bar plot. fplot - Easy to use function plotter. ezpolar - Easy to use polar coordinate plotter. feather - Feather plot. fill - Filled 2-D polygons. fplot - Plot function. heatmap - Heatmap chart. parallelplot - Parallel coordinates plot. pareto - Pareto chart. pie - Pie chart. plotmatrix - Scatter plot matrix. rose - Angle histogram plot. scatterhistogram - Scatter plot with marginal histograms. stackedplot - Stacked plot. stem - Discrete sequence or "stem" plot. stairs - Stairstep plot. wordcloud - Word cloud. Contour and 2-1/2 D graphs. contour - Contour plot. contourc - Contour computation. contourf - Filled contour plot. contour3 - 3-D Contour plot. clabel - Contour plot elevation labels. fcontour - Easy to use contour plotter. fimplicit - Easy to use implicit function plotter. pcolor - Pseudocolor (checkerboard) plot. voronoi - Voronoi diagram. Specialized 3-D graphs. bar3 - 3-D bar graph. bar3h - Horizontal 3-D bar graph. comet3 - 3-D comet-like trajectories. fimplicit3 - Easy to use 3-D implicit surface plotter. fmesh - Easy to use 3-D mesh plotter. fplot3 - Easy to use 3-D parametric curve plotter. fsurf - Easy to use 3-D colored surface plotter. meshc - Combination mesh/contour plot. meshz - 3-D mesh with curtain. peaks - A sample function of two variables. pie3 - 3-D pie chart. ribbon - Draw 2-D lines as ribbons in 3-D. stem3 - 3-D stem plot. surfc - Combination surf/contour plot. trisurf - Triangular surface plot. trimesh - Triangular mesh plot. waterfall - Waterfall plot. Volume and vector visualization. vissuite - Visualization suite. isosurface - Isosurface extractor. isonormals - Isosurface normals. isocaps - Isosurface end caps. isocolors - Isosurface and patch colors. contourslice - Contours in slice planes. slice - Volumetric slice plot. streamline - Streamlines from 2D or 3D vector data. stream3 - 3D streamlines. stream2 - 2D streamlines. quiver3 - 3D quiver plot. quiver - 2D quiver plot. divergence - Divergence of a vector field. curl - Curl and angular velocity of a vector field. coneplot - 3D cone plot. streamtube - 3D stream tube. streamribbon - 3D stream ribbon. streamslice - Streamlines in slice planes. streamparticles - Display stream particles. interpstreamspeed - Interpolate streamline vertices from speed. subvolume - Extract subset of volume dataset. reducevolume - Reduce volume dataset. volumebounds - Returns x,y,z and color limits for volume data. smooth3 - Smooth 3D data. reducepatch - Reduce number of patch faces. shrinkfaces - Reduce size of patch faces. Images display. image - Display image. imagesc - Scale data and display as image. contrast - Gray scale colormap to enhance image contrast. Movies and animation. movie - Play recorded movie frames. rotate - Rotate object about specified origin and direction. frame2im - Convert movie frame to indexed image. im2frame - Convert index image into movie format. Color related functions. spinmap - Spin colormap. rgbplot - Plot colormap. colstyle - Parse color and style from string. dither - Convert image using dithering. Solid modeling. cylinder - Generate cylinder. sphere - Generate sphere. ellipsoid - Generate ellipsoid. patch - Create patch. surf2patch - Convert surface data to patch data. See also GRAPH2D, GRAPH3D.
And we can also find tools from other places, where plot has been overloaded to generate graphics from specific classes. The most obvious cases I can think of off the top of my head are things like plot, as applied to a polyshape, or to a graph, or to a curve fitting object. I'm sure others could add to that list of course.
@John D'Errico thank you for answer, the problem is that i don't know a good language of matlab , and i don't have time to learned but i saw have template , you list them so good if you have template of each one of them please upload it specialy surface and countour and effect of parameter there is a lot kind ...
No. I won't/can't possibly give you the documentation for every possible 3-d tool in MATLAB. That documentation is already written anyway.
As we showed you, there are many such codes. I even gave you a very good list to start. Look at ANY code in those lists that end with the number 3. Read the help. If you cannot read the help, then how will you read anything we write anyway?
Start with those that seem of interest to you. Again, anything that ends with the number 3 in the name. If you don't know MATLAB well, then it is time to start learning!
The function gallery provides a number of different matrices that can be surf() or contour()
@John D'Errico you wanna dystroy my moral, i have a lot bro is not like that i can't read anything i can but i am not expert i don't have skill in matlab language becuase of that i asked that ...
@Walter Roberson exactly i am looking for template about 3d plot not just for surf() and countour() and desity() so on but need temlate for just transfer in it and take the graph for article . i don't know why anyone not share the template in i don't know why .
dpb
dpb on 6 Oct 2024
Edited: dpb on 6 Oct 2024
@salim saeed, I don't know what you think a template is/would be that would let you "just transfer in[to] it and take the graph for article " but it sounds as if you're asking somebody to write code for your specific purpose without you doing the work...the forum doesn't work that way; it isn't a general consulting platform.
If you need a specific plot matching the images you posted, MATLAB doesn't have one of those pre-packaged; it undoubtedly could be produced by combining the various available forms and there are even some examples that show some things that are similar but the specific graph itself will have to be built from those base pieces.
Sometimes if foks ask and provide attempts that show an effort to solve the problem and provide representative data to let the forum volunteers have something to work with, they will do amazing things in response, but generally generic questions without such background won't inspire anybody to try to invent something from scratch without that illustration that the poster has invested at least some effort first...
Here's a recent example of <that kind of interaction> to give you an example of how to ask.
If, however, your expectation is to have a working function provided without further effort on your part and without investing some time and effort into learning MATLAB, your best path will be to hire a consultant.
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
plot3 - 3-D line plot This MATLAB function plots coordinates in 3-D space. Vector and Matrix Data 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) Table Data plot3(tbl,xvar,yvar,zvar) Additional Options plot3(ax,___) plot3(___,Name,Value) p = plot3(___) Input Arguments X - x-coordinates scalar | vector | matrix Y - y-coordinates scalar | vector | matrix Z - z-coordinates scalar | vector | matrix LineSpec - Line style, marker, and color string scalar | character vector tbl - Source table table | timetable xvar - Table variables containing x-coordinates character vector | string array | cell array | pattern | numeric scalar or vector | logical vector | vartype() yvar - Table variables containing y-coordinates character vector | string array | cell array | pattern | numeric scalar or vector | logical vector | vartype() zvar - Table variables containing z-coordinates character vector | string array | cell array | pattern | numeric scalar or vector | logical vector | vartype() ax - Target axes Axes object Name-Value Arguments Color - Color [0 0.4470 0.7410] (default) | RGB triplet | hexadecimal color code | 'r' | 'g' | 'b' | ... LineWidth - Line width 0.5 (default) | positive value MarkerSize - Marker size 6 (default) | positive value MarkerEdgeColor - Marker outline color "auto" (default) | RGB triplet | hexadecimal color code | "r" | "g" | "b" | ... MarkerFaceColor - Marker fill color "none" (default) | "auto" | RGB triplet | hexadecimal color code | "r" | "g" | "b" | ... Examples openExample('graphics/Plot3DHelixExample') openExample('graphics/Plot3MultipleLinesExample') openExample('graphics/Plot3MultipleLinesMatricesExample') openExample('graphics/Plot3WithTitleAndAxisLabelsExample') openExample('graphics/Plot3MarkersOnlyExample') openExample('graphics/Plot3CustomColorAndMarkerExample') openExample('graphics/Plot3SpecifyLineStyleExample') openExample('graphics/Plot3ModifyLineAfterPlottingExample') openExample('graphics/Plot3TableDataExample') openExample('graphics/Plot3TableMutliVariablesExample') openExample('graphics/Plot3SpecifyAxes19bExample') openExample('graphics/Plot3DurationDataExample') openExample('graphics/Plot3LineWithOneMarkerExample') See also axis, scatter3, bar3, tiledlayout, nexttile, grid, Line Properties Introduced in MATLAB before R2006a Documentation for plot3 doc 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.
@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.

Sign in to comment.

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 Comments

dpb
dpb on 6 Oct 2024
Edited: dpb on 7 Oct 2024
ADDENDUM: I did play a little with subplot to add the second axes; I was able to create the effect in the second suplot area (2,2,2); I've yet to figure out how to get the same effect in the (2,2,1) position; it's not really an intended functionality it appears. I suspect there is some way to make it work, but it may take a fair amount of fiddling around with -- there's where a Mathworks whizard may drop by and know the ins and outs well enough to accomplish it...
The other alternative, albeit more effort is to be able to make the individual plots and then export them into another package that will let you arrange them as desired.
@dpb thank you you did a great job thank for hardd work and your information.
@dpb possibly using GUIDE or AppDesigner to place the axes, a step forward to a so called "template"

Sign in to comment.

Walter Roberson
Walter Roberson on 7 Oct 2024
Edited: Walter Roberson on 7 Oct 2024
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.

Categories

Find more on Graphics Performance in Help Center and File Exchange

Asked:

on 5 Oct 2024

Edited:

on 7 Oct 2024

Community Treasure Hunt

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

Start Hunting!