Changing Coordinate axes type in Paraview - paraview

How to change in Paraview, the co-ordinate axes from default to left-handed co-ordinates from This to This
I am reading in a vtk file written in legacy format for rectilinear grid
Thanks for the help

ParaView does not support left-handed coordinates. The best you can do is convert your left handed coordinates to right-handed coordinates to make them displayed correctly. The easiest way to do so is probably to use the Transform filter and scale by -1 along one axis.
Unfortunately, you cannot change the labels of the orientation axes (in the lower right corner) to be labeled as left-handed. However, if you are using the Axes Grid, you can changes the labels of that to indicate left-handed coordinates.

Related

Paraview: Add axes to the planes not aligned with the Orientation axes

I have created a slice in paraview. This slice is rotated about the z axis. Hence when I use the "Axes grid" for adding the axes, the axes also appears to be rotated. If there a way to define a new axes in Paraview that aligns with the rotated slice? Can someone please help me?
You will have to use the Transform filter and configure it manually based on your slice Z-rotation. Not very practical I agree.

What are the Coordinate Axes alignment in plot generated by quiver

I am using quiver to plot optical flow over my image using this answer.
Following is taken from matlab quiver documentation page
A quiver plot displays velocity vectors as arrows with components
(u,v) at the points (x,y).
For example, the first vector is defined by
components u(1),v(1) and is displayed at the point x(1),y(1).
We know that while reading an image the index(1,1) is at top left.
Now where does quiver assumes it's origin and in which direction it assumes the alignment of axes while generating the plot.
By default the x axis values increase to the right and the y axis increase towards the top.
However imshow which is used in the linked answer reverses the y axis direction, similar to axis('image'). This is because image data is generally stored with the top left of the image appearing first in the data.
The directions can be checked with:
get(gca,'ydir')
get(gca,'xdir')
if hold is on quiver will plot using this reversed y direction so the origin is in the top left. (assuming the lowest value for the axis is 0)
If hold is not on or the directions are not reversed the origin will be at the bottom left and quiver will use with the default axis directions. (again assuming values>=0)

Change 3D view in matlab

I would like to change the view of a 3D plot in matlab such that the y-axis points upward and the z-axis points to left. For example, consider the following plot:
Here the x-axis points forward, the y-axis points to the right and the z-axis points upward.
I would like to have the y-axis points upward and the z-axis points to the left instead. I tried to rotate the plot (using the figure window toolbar rotate button) but I could not get it to work. (It should just be a simple 90 degrees rotation about the x-axis)
Code to generate the plot:
membrane
view(100,50)
xlabel('x-axis');
ylabel('y-axis');
zlabel('z-axis');
grid on
Try using view. I don't have MATLAB available so I can't test it, but I think it can do what you want.
Example from the documentation:
Set the view along the y-axis, with the x-axis extending horizontally
and the z-axis extending vertically in the figure.
view([0 0]);
EDIT:
Try using three inputs to the view function. I can't experiment myself, but you should be able to do it if you choose the right values here.
From documentation:
view([x,y,z]) sets the view direction to the Cartesian coordinates x,
y, and z. The magnitude of (x,y,z) is ignored.
EDIT 2:
Check out camroll. I think camroll(90) (possibly in combination with view) will work.
From documentation:
camroll(dtheta) rotates the camera around the camera viewing axis by
the amounts specified in dtheta (in degrees). The viewing axis is the
line passing through the camera position and the camera target.
This was posted a while ago, but in case someone else is looking for ways to set y-axis as the vertical one here is a possible fix.
Manually: In the command window type cameratoolbar('show') which will open an interactive toolbar in your plot from which you could change the view. One of the options is to set a principle axis to x, y, or z.
Or in you script you could use cameratoolbar('SetCoordSys',coordsys) command which sets the principal axis of the camera motion. coordsys can be: x, y, z, or none.
http://uk.mathworks.com/help/matlab/ref/cameratoolbar.html

Correct scaling of circular markers in scatter plot

I have a system of finite size circular particles (say r=5cm) which I need to plot in a given domain (say L=5m). Since they are many, scatter is faster than any cyclic use of rectangle.
What is unclear to me is the correct way to define the diameter/radius of the circles/marker so to scale correctly with the domain geometry which is plotted as well. (By using rectangle, the diameter of the particle can be easily defined.)
Based on this answer, it is possible to have fine control of the marker size, although the real scaling is obscure to me.
Can anyone shed some light?
The SCATTER function expects its 'S' parameter to contain the marker
area in points squared. This area corresponds to the area of a square
bounding box around the marker.
The source is the technical solution "How do I specify the size of the markers created by the SCATTER plot in units proportional to the data being plotted in MATLAB 7.6 (R2008a)?"
Check out the code in the link.
The official documentation states:
MarkerSize
Marker size. Size of the marker in points. The default value is 6.
Note that one point is 1/72 of an inch, so it's an absolute measurement unit.
If you want to tune the marker sizes according to the axis scale of your plot, do a simple unit conversion: calibrate 1 tick in one of the axes to points (you can do it by trial and error), and then normalize all your marker sizes by it (it doesn't, however, occur to me how you'd keep the marker sizes relative to the plot's zoom level in a straightforward manner).
By the way, you can specify the sizes of the markers directly as the third parameter in the scatter command. With this, you can avoid the get and set manipulations mentioned in the answer to which have linked your question.

Is there any way to change the xy positions in scatter graph in core plot

I am creating scatter graph, I need to change the x and y positions in scatter graph. Graph always starts with (0,0) positions but i need to show the starting points (7000, 800). Is there any way to change the x and y positions in scatter graph in core plot.
After showing the graph need to draw the line manually and get those values to search the properties.
Please help me.
Thanks in advance.
to set the point where the co-ordinates meet you have to set the orthogonal co-ordinate decimal
x.orthogonalCoordinateDecimal = CPTDecimalFromString(#"800");
y.orthogonalCoordinateDecimal = CPTDecimalFromString(#"740000");
and for setting the range of values to be plotted set the visibleRange for both the axes
These are features of the "plot space" in Core Plot. It defines the coordinate mapping between the plot area (basically the rectangle that contains all plot drawing) in data coordinates and the view in drawing coordinates. The xRange and yRange control the x and y range of the plot space, respectively.
The plot space converts coordinates in both directions—from data to view when drawing and from view to data when (for example) responding to touch events on a plot. See the plot space docs for a list of the available coordinate conversion methods.