Pcolor
There are three three filesRecolor_pcolor.m , Recolor_contourf.m and colorbar_levels.mThe Recolor_pcolor/Recolor_contourf functions re-assign the specific colors to specific levels. The required colormap must be assigned to the pcolor/contourf plots before calling this function. The number of...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (43): Use of discrete colors in contourf and pcolor with colorbar Download |
Syntax:>> imagescnan(Z) % Uncolored NaNs>> imagescnan(Z,'k') % ColoredIMAGESC is a good option when the user doesn't like the interpolating behaviour of SURF or PCOLOR, because EVERY element is drawn as a single pixel CENTERED with the axis value.The problem with this function is that it doesn't...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (43): imagescnan.m (Aug 2009) Download |
Kriging and inverse distance are popular interpolation methods, especially in earth sciences. There are some routines already available on matlab but are severely limited by matlabs memory constraints. By using gstat to handle interpolation and variogram modelling, very large datasets are easily...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (50): Kriging and Inverse Distance Interpolation using GSTAT Download |
Intended for 3D geological/geophysical visualisation of layered data and will eventually form part of a geophysical visualisation package.Run ThreedDemo to get an idea of how to use. INPUTS: LayerN: The number of the layer to be plotted R: a m*n*k matrix of colour/resistivity data for each layer...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (49): Surf3D Download |
This is basically a wrapper to the pcolor routine which pads the arrays passed to pcolor so that the full array is plotted. It also centers the ticks on the pixels rather than on the edges. The EdgeColor is set to 'none.' This is good for plotting data on a grid when you don't want any...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (40): pixplot Download |
Wrapper for pcolor that behaves similarly to imagesc. Squash OS X Preview's "blurry image" bug!SANEPCOLOR simple wrapper for pcolor Unlike the built-in pcolor command, this function does not cut off the last row and column of the input matrix. In this way, sanePColor is intended to be as easy to...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (43): sanePColor Download |
This is really a small hack that I wanted to share just to inspire more people to make interactive Matlab graphics. Use it as is or use the code as a template to do more advanced stuff.Here is how it works (for a 2-D patch):% First make the patch ... t = 0:2*pi/20:2*pi; X = 3 + sin(t); Y = 2 +...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (46): Moveit2 - Move a graphical object with the mouse Download |
I often find myself trying to compare the results of different functions z=f(x,y), using datatips in the plots. This function provides a way of exploring results in one plot while observing values in the other plots as well. Linkdtatips works with plots formed by image, imagesc, mesh,meshc,...
Platforms: PHP
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (45): linkdatatips Download |
ZEMAX is an optical simulation code (http://www.zemax.com/). One of its features, Physical Optics Propagation, calculates the electric fields as they travel through the simulated optical system. The results can be saved in the ZEMAX Beam File (ZBF) format. It is useful to be able to read the ZBF...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (46): Read ZEMAX Beam File (ZBF) Download |
histnd Histogram count of ND data with ND bins histmat = histnd(x, y, ..., xedges, yedges, ...) Extract ND histogram data containing the number of events of [x, y, ...] tuples that fall in each bin of the ND-grid defined by xedges, yedges, .... The edges are passed to histc internally and should...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): histograms for ND data Download |
function mHist = hist2d ([vY, vX], vYEdge, vXEdge)2 Dimensional HistogramCounts number of points in the bins defined by vYEdge, vXEdge.size(vX) == size(vY) == [n,1]size(mHist) == [length(vYEdge) -1, length(vXEdge) -1] EXAMPLEmYX = rand(100,2);vXEdge = linspace(0,1,10);vYEdge =...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): 2D Histogram Matrix Download |
function histmat = hist2(x, y, xedges, yedges) Extract 2D histogram data containing the number of events of [x , y] pairs that fall in each bin of the grid defined by xedges and yedges. The edges are vectors with monotonically non-decreasing values.The code is optimized no loop inside, it can be...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (49): 2D Histogram Calculation Download |
LOGZPLOT is an easy way to create surface plots with both a log-scaled z-axis and log-scaled coloring. LOGZPLOT creates a plot using SURF, MESH, PCOLOR, TRISURF or TRIMESH, then applies the logarithmic transformation. If called without data inputs, LOGZPLOT will apply the logarithmic scaling to...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (49): logzplot Download |
Sometimes a graphing function will not know in advance how many sub-plots are to be created. In this case hard-coding the number of rows and columns for the subplot command may not be possible. This function produces reasonable values for the row and column inputs to subplot given the number of...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): numSubplots - neatly arrange subplots Download |
Smooths 2D array data. Ignores NaN's.function matrixOut = smooth2a(matrixIn,Nr,Nc) This function smooths the data in matrixIn using a mean filter over arectangle of size (2*Nr+1)-by-(2*Nc+1). Basically, you end up replacingelement "i" by the mean of the rectange centered on "i". Any NaNelements...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (50): smooth2a Download |