Make a cubic box in 3d scatter plot in Octave - plot

I have made the following figure in Octave using the scatter3 function.
I would like to draw the rest of the sides of the cube in the plot (the lines x=0,y=0, z=20,x=0 etc). How to do this?

plot3([0,0],[0,0],[0,20],'linewidth',2,'k')
Draws a line between (0,0,0) and (0,0,20). Make such lines for all the sides.

Related

R - Interpolate between lines that are not vertical or horizontal oriented

I am looking for a way to interpolate between lines in a raster. I have a raster file with x and y in GK coordinates and a value for each point on the line:
Plot with lines to interpolate between (I am not yet allowed to add pictures)
Is there a function or a way that allows to only interpolate between the lines? Using interpolate from the Field package does an interpolation everywhere in the raster space, which is not useful for me.
The aim is to have a filled contour between the lines. So something like this: Filled contour between two vertical lines. I am able to do that for a vertical or horizontal combination of lines. But not for any other angles.

Remove 2D line distortion

I want to draw a straight line using X and Y pixels but my input data is not streamlined. So I tried to draw the line.And it looks like this How should I remove distortion using interpolation or any other techniques.
Actually my problem is This is my expected graph. But I am getting this distorted image with simulation Distorted lines and curves because of uneven pixels. I want to streamline this graph

changing angle in 3d scatterplot?

I drew a 3D scatterplot in R which is a flat surface.
But the plot does not clearly show what it looks like, so I'd like to change the angle to see this plot at a different viewpoint.
How can I do this?

Scatter plot with pareto frontier using gnuplot

I can currently use gnuplot to plot a scatter graph. But what I am unable to do is connect all the points on the graph which form the rightmost frontier(i.e these points do not have any points further to their right)
Here's an example of a scatter plot with rightmost frontier.
http://www.schoolbenchmarking.com/Images/FrontierPlot.gif
Any clues on how to achieve this would help a lot!
Thanks.
AFAIK gnuplot does not have a feature determining the outer border of a plot.
Since you can include scripts in gnuplot, you could program your own logic into it. But I think it would be easier if you just create another data set and plot that as a solid line.

R- xy scatter plot in 3d using density

I want to visualize an x-y scatter in 3d, using the density/overlaps as z values. I guess this would be like using alpha as a z-axis - more overlap = higher z. Suggestions? Perhaps using cloud() in lattice library?
I use rgl for 3D visualization. You can rotate the image in rgl window using your mouse. Wheel zooms in/out.
example(plot3d)
rgl.bg(color = "black") # Space, the final Frontier.
There are a variety of 2d density functions available:
MASS::kde2d
fields::smooth.2d
hexbin::hexbin
In general visualizing 3d clouds of points is rather difficult. Pseudo 3d with surfaces is ok but the points do not display with sufficient depth cues. If you really want to try it, then use the rgl package so you can rotate.

Resources