[Paraview] Visualize equdistant cell-centered data
Buesing, Henrik
hbuesing at eonerc.rwth-aachen.de
Thu Feb 8 05:42:47 EST 2018
Ok. Let me rephrase my question. Maybe someone speaks Matlab? Full Matlab Code below (see [1]).
Let's assume I have a 2x2 matrix with color values C=[1 2; 3 4]. Now I can visualize this matrix with on a 2x2 grid with surf in Matlab. What I get is one square with the color values on each node (see Case 1 in the Matlab code). This is what Paraview does!
What I want is the following: I define a new grid, which is 3x3. So one value more in each direction than I have color values. On this grid the color values live cell-centered. If I now visualize this in Matlab, I get a 2x2 block matrix with color values from 1-4. This is what I want!
To sum up: I want to keep my color values, but I want to define a new cell-centered grid (with size(C,1)+1) where these color values live on. Is this somehow possible in Paraview?
Thank you!
Henrik
[1]
% Full Matlab Code to visualize the two cases.
C = [1 2; 3 4];
% Case 1
x=linspace(0,1,size(C,1));
y=x;
[X,Y]=meshgrid(x,y);
Z=zeros(size(C));
figure;surf(X,Y,Z,C);shading interp;view(0,90);
colorbar
% Case 2
x=linspace(0,1,size(C,1)+1);
y=x;
[X,Y]=meshgrid(x,y);
Z=zeros(size(C)+1);
figure;surf(X,Y,Z,C);shading flat;view(0,90);
colorbar
--
Dipl.-Math. Henrik Büsing
Institute for Applied Geophysics and Geothermal Energy
E.ON Energy Research Center
RWTH Aachen University
Mathieustr. 10 | Tel +49 (0)241 80 49907
52074 Aachen, Germany | Fax +49 (0)241 80 49889
http://www.eonerc.rwth-aachen.de/GGE
hbuesing at eonerc.rwth-aachen.de
Von: ParaView [mailto:paraview-bounces at paraview.org] Im Auftrag von Buesing, Henrik
Gesendet: Freitag, 19. Januar 2018 21:13
An: paraview at paraview.org
Betreff: [Paraview] Visualize equdistant cell-centered data
Dear all,
I have a "Structured (Curvilinear) Grid" (*.vts), which gets read in as 314531 cells and 330000 points. I would like to tell Paraview that this is equidistant cell-centered data (330000 cells). I want every cell to get one color, such that color interpolation becomes correct.
Can I somehow convert the data I have?
Thank you!
Henrik Büsing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://paraview.org/pipermail/paraview/attachments/20180208/76c82a4c/attachment.html>
More information about the ParaView
mailing list