How can we modify the scale of x and y axis in scatter plots in orange? - orange

I am new to Orange and using it for data visualization. I want to change the scale of x and y axis while plotting scatter plots. Can you please suggest how can it be done?

You can change scale by zooming in or out. Zoom in with the zoom icon. To zoom out, hold the right mouse button on the figure and drag mouse up or down.

Related

Changing the plot position of z-axis

I wanted to change the position of z-axis in a 3d graph. I tried to do using graph properties but it does not work, Matlab has this option in 2D plot in axis properties window in the graph, but it does not work in 3d plots. Currently,the plot is at z=0 and I wanted to the position to z=6. Attached is the sketch where I need to change the position of the curve plot (red) from z=0 to z6. I appreciate if there is any solution/suggestion regarding this issue. Thank you.
sketch
Regards,
Alishah
A very simple solution for this question is that convert z in your formula to z-6. You know it from mathematics, It will shift a curve, 6 unit .
If you want to change in right or left, you plus or minus.

See mouse coordinates when I move it over the paraview image

I'm looking for a way to see the cursor position of a 2D plot in paraview (vtk), that is, see the coordinates of the mouse when I move it over the paraview image.
No, but you can hover over a point and it will show you the x and y values of the plot.

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

Rotating a plot?

I have obtained an x-y plot in Matlab of the sine curve and I wish to rotate this plot by 90 degrees counter clockwise. How do I do this?
In the figure you have plotted, click 'View'->'Camera Toolbar'. Use the Roll Camera icon, and that should allow you to rotate your plot.
EDIT: You can also use the camroll function to do this programatically
camroll(90)
Note, this actually rotates the camera looking at the plot clockwise, not the plot itself. So if you want to rotate the plot 90 degrees counter-clockwise, you will need to rotate the camera 90 degrees clockwise.
Another solution is function view:
view([90 90])
In my opinion this is better solution because there is a problem with labels when one uses camroll function. See code below:
y = rand(1,10);
subplot(211)
plot(1:10,y)
xlabel('x')
ylabel('y')
view([-90 90])
subplot(212)
plot(1:10,y)
xlabel('x')
ylabel('y')
camroll(90)
The best way is to use view([az,el]) that works also for 3d plots.
plot your graph using surf, mesh, etc. and put the graph manually in the desired position using the interactive rotate 3d tool at the tool bar. You see at the left side bottom of the plot the values for the horizontal rotation (azimuth, az) and the vertical elevation (el).
Note the values for az and el and use view([az,el]) to plot.
(When choosing az and el manually it seems like it gives only 2d-plots since the parameters are to be set correctly. Values like [0,1], [0,1], ... normally not work.)

How to visualize a 3d scene using surf

I have an image loaded from disk as a texture, and a same-sized matrix d which has the corresponding depths.
How can I use surf to show me the image as a 3d-model? Simply taking
surf(depthMatrix, img);
doesn't give a nice result since
the camera looks not from the x-y plane in z-direction
It looks fairly black
It doesn't look that smooth although my depth matrix is actually smoothed out when I show it using imshow(depthMatrix, []);
You can use texture mapping to display your image on your surface like so:
surf(depthMatrix,img,... %# depthMatrix is z data, img is an image
'FaceColor','texturemap',... %# Use texture mapping
'EdgeColor','none'); %# Turn off edge coloring
And to address your 3 points:
You can adjust your camera angle with the mouse by pressing the button on the figure, which turns on interactive 3-D rotation. You can also turn interactive rotation on using the function ROTATE3D, or you can change the camera view without the mouse using the function VIEW.
Your plot was looking black because edges are drawn as black lines by default, and there were probably a lot of them.
You can adjust the axis scaling and limits to make your surface appear smoother. For example, axis equal will make data units the same for all 3 axes, so your z axis (which ranges from 0 to 25) will be flattened significantly since your other two axes span ranges in the hundreds. Alternatively, in your call to SURF you can specify x and y data to use for the values on those axes, which can ultimately help you to better adjust the relative scaling between those axes and the z axis.