I have a matrix it Matlab that results in a circular contour plot
Is there any way to change the axess from rectangular to polar without changing the shape of the graph?
Related
If there is an easier way to do this in general any suggestions would be appreciated.
I have imported a .nc file into Matlab and currently have a surface plot created from the interpolated matrix of data which corresponds to longitudes and latitudes. An alpha scale has been applied to add opacity and now I would like to place a map of said longs and lats beneath it so that it acts as an overlay.
here is the code used to plot where xq,yq is the mesh longitude and latitude grid and newMatrix is the interpolated version of the original matrix. Attached is the top view surf plot which I would like a map of long lat restricted x,y axis beneath (line style or topographic)
f = figure;
ax = axes('Parent',f);
h = surf(xq,yq,newMatrix,'Parent',ax);
set(h, 'edgecolor','none');
view(ax,[0,90]);
alpha color
alpha scaled
grid off
colorbar;
I'm aware of geomap but I'm not sure how it can be used in this way without causing the axis to misalign or just not be applied correctly. Before I was using a contour plot but found it easier to interpolate and plot with surf as per this post: Matlab how to make smooth contour plot?
Four-way logarithmic plot is a very often used graph for vibration control and earthquake protection. How can this plot be plotted in MATLAB
instead of adding axes in Inkscape?
A sample of four-way logarithmic plot is here:
I have multiple theta and rho stored as matrices in variable out. I want to plot all of them using polar function in Matlab R2015b.
I'm new to Matlab and so far I did this :
subplot(1,3,1)
polar(out(1),out(2),'*')
subplot(1,3,2)
polar(out(3),out(4),'*')
subplot(1,3,3)
polar(out(5),out(6),'*')
I've two questions:
How can I combine them into a single polar plot, i.e one figure instead of three with '*' position intact ?
How can I remove the lower part of polar plot so that I can have a semicircle instead of full plot? Is it possible to customize polar plot labels like removing the degree labels?
Use the commmand hold on (and get rid of the subplots) or
Plot everything together with polar(out(1:2:end),out(2:2:end),'*')
Use the ylim([-0.5 0]) command see this answer.
How to plot a figure like this
The data is like f(x_i,t_j), i=1,2,..,M, j=1,2,...,N. The horizontal axis is time t and vertical axis is space x
I know that mesh gives a 3-D plot and surf also gives 3-D surface, I wonder which command can give the above 2-D figure?
To make a 2D heatmap, display your array as an image using imshow, and add a colorbar.
Could you tell me how to plot in Matlab figure such as below (smooth transition of colors)? Function countour allows only to create plot with contour lines which doesn't provide enough information to me.
You can use imagesc with the 'jet' colormap. Here's an example:
x = conv2( randn(600), fspecial('gaussian',200,20), 'valid'); %// example 2D smooth data
imagesc(x)
colormap(jet)
colorbar
grid
That is not a contour plot!
try imagesc, surf and all of their variants:
http://uk.mathworks.com/help/matlab/surface-and-mesh-plots-1.html
http://uk.mathworks.com/help/matlab/image-file-operations.html