I have a dataset that has x,y,z columns. I have created surface plot using gnuplot and contour on top and bottom as see below. Here is the dataset: https://www.dropbox.com/s/8evj5da7yco1xmo/datx.dat?dl=0
Below is the plot from the data in the link.
I'm trying to create a contour plot like the one below with contours on the side, how do I accomplish this in gnuplot?
Here is the solution http://gnuplot-tricks.blogspot.com/2010/ but I'm unable to replicate it for my dataset.
Related
I have some latitude and longitude of some points. I want to make an Elevation-distance plot using python. I have a code which can plot elevation vs distance plot between two points, but doesn't know how to make if there is more than one point?
Note these points are not in a Straight line.
https://www.geodose.com/2018/03/create-elevation-profile-generator-python.html
I am trying to visualize results from varying three different parameters using gnuplot. I can produce a 4D plot by using an xyz scatter plot with color as the fourth dimension. Now what I want to do is to take the limited data I have and produce higher quality images. As seen below, if I angle the 4D plot in just the right way I can get what looks like a series of 3D plots along one dimension. Is there a way I can individually interpolate these 3D slices and obtain smoothed planar surfaces for the cross-sections instead of the scatter plot form I currently have?
4D Scatter Plot Angled to Look Like 3D Cross-Sections:
New in version 5.4 (please try and report on the release candidate!)
http://gnuplot.sourceforge.net/demo_5.4/voxel.html
I want to add markers to some of my plots using pointtype. If I plot data like so:
plot "somedata.txt" w linespoint pointtype 6
or a function like so:
plot cos(x) pointtype 6
I get exactly what I want: a line between and a marker on top of all data points. Right now I want to achieve the same, but after "smoothing" out a dataset using smooth bezier:
plot "somedata.txt" w linespoint pointtype 6 smooth bezier
However pointtype doesn't seem to do anything. I can set linecolor, linewidth and linetype as before, but not pointtype.
Does anyone know of a work-around that can still produce markers on top of a smoothed plot?
I have the same issue that gnuplot does not plot points on top of a smooth curve. I speculate that since gnuplot is plotting a function derived from the data points, it does not bother putting the point markers on top of the original data points
Note that a bezier curve will not necessarily overlay the original data points.
My workaround would involve plotting the data twice in different ways:
plot 'data.txt' with points title 'original data', \
'' smooth bezier title 'smoothed data'
I agree with #andyras. I have this issue a few weeks algo and couldn't find a way to put both, the smoothed curve and the data. Thus, I plotted two series, one with the smoothed curve and another just for the points.
Edit: sorry for adding a new answer. I'm on my phone and couldn't find a way to comment under #andyras answer
I am trying to read an input image using octave and plot its RGB values as a 3 dimension plot.
I am reading image using
im = imread('image')
How can I plot this?
Also, is it possible to plot a histogram of all the 3 layers?
Thanks
As already stated, the Octave API doc gives you an MxNx3 matrix data set of your image.
The R/G/B channels are the last dimensions of your im matrix. hist needs 1d input, so we'll need to reshape it:
hist(reshape(im(:,:,1),1,[])) # red
hist(reshape(im(:,:,2),1,[])) # green
hist(reshape(im(:,:,3),1,[])) # blue
About the 3D plot: do you mean a 3D scatter plot? Then Octave's scatter3 might help you.
I have a data file, looking like
550 1.436e+00 7.857e-01 5.906e-01 4.994e-01 4.574e-01 4.368e-01 4.260e-01 4.273e-01 4.296e-01 4.406e-01 4.507e-01 4.639e-01 4.821e-01 5.008e-01 5.156e-01 5.378e-01 5.589e-01 5.768e-01 5.970e-01 6.196e-01 6.422e-01 6.642e-01
The first column is for x-axis, the rest ones are for the y-axis, 22 curves totally.
I want to plot the data so that y tics represent cube roots of the values. Actually, I want my cubic curves to become linear, to show, that they're cubic in the normal coordinates (and it is fixed by my task to use these coordinates).
I tried to use the following command:
plot for [i=2:23] datafile using 1:(i ** .333) smooth cspline
It expects column number in place of i.
I know, the following is correct:
plot datafile using 1:($2 ** .333) smooth cspline
giving me the desired plot for my first line. But how do I modify this for plot for?
If you want the column number in place of i, you should use column(i) in the using specification.
plot for [i=2:23] datafile using 1:(column(i) ** .333) smooth cspline