Need better resolution in my plot!

23 visualizaciones (últimos 30 días)
Marcus Rosales
Marcus Rosales el 5 de Feb. de 2020
Comentada: Marcus Rosales el 10 de Feb. de 2020
Hello,
I am working on a plot of a local density of states and want to know if anyone has any suggestions to improve the resolution.
Basically, all I am doing is taking a matrix of values and plotting these magnitudes on a lattice. The function I am doing to do this plot is pcolor, which I understand may not be the best choice. I am just not sure how to plot a matrix with a different function. If anyone knows of a better function or how to improve pcolor's resolution, it'd be greatly appreciated!
Attached are the relevant programs. I tried attaching the parameters complied from BdG, but they were too large even after zipping. I set the number of lattice sites N=60, so it does not take too long to compile (note this will affect the resolution but not terribly bad). Run example after the workspace has the relevant parameters loaded.
Any help will be greatly appreciated! Thanks.
  7 comentarios
Marcus Rosales
Marcus Rosales el 10 de Feb. de 2020
I never talked about those stripes... Not sure why you think those are the issue here, but they aren't.
Walter Roberson
Walter Roberson el 10 de Feb. de 2020
Since you are not passing in x and y coordinates, the value at each location is simply the mean of the four surrounding values, which is effectively a low-pass filter that would have the effect of making the data less pixelated than it starts out.
pcolor does not do any extrapolation in the mode you are calling it with. The number of faces it produces across is equal to one fewer than the number of columns, and the number of faces it produces down is one fewer than one number of rows. Each face is a solid color unless you use a "shading" command.
There is, of course, always issues if the size to allocate to each face according to the axes size and number of faces is not an integer number of pixels, but pcolor has nothing to do with how colors are chosen for that case.

Iniciar sesión para comentar.

Respuesta aceptada

Guillaume
Guillaume el 10 de Feb. de 2020
I'm a bit confused. I still have no idea which bits of code are relevant. Still can't run example.m and I'm unclear what to to do with the outputs of BdG_Hamiltonian. As for your figure, it contains an Image object in the axis whereas pcolor creates a Surface object.
It looks like you used imagesc, not pcolor. Anyway, as I wrote pcolor, imagesc, etc. do not do any interpolation. They plot exactly the number of points you give them. However, it's trivial for you to rescale your original matrix to a higher resolution:
%get the cdata out of plot_of_LDOS.fig since we don't have the original data:
hfig = openfig('plot_of_LDOS.fig');
source = hfig.Children.Children.CData; %Children of figure is the axis, children of the axis is the image
%plot at higher resolution
figure;
imagesc(imresize(source, 8))
  3 comentarios
Guillaume
Guillaume el 10 de Feb. de 2020
Maybe I should have said they don't do supersampling. If you give them a 100x100 matrix, they'll plot 100x100 points (or 99x99 for pcolor). If higher resolution is desired, then the original input needs to be resampled to 200x200 for example.
Marcus Rosales
Marcus Rosales el 10 de Feb. de 2020
I'm going to give this resize a try; thanks!
I unfortunately can not do a 200x200 matrix since this is for one too computationally intense for my computer, and we need a specific lattice size.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by