Making Elevation-distance plot - python-3.x

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

Related

How can I plot time-series on matplotlib polar plot?

Unsure if a polar plot is exactly what I should be using to accomplish this. But, essentially, I have multiple time-series (just amplitude vs. time), each corresponding to a different angle in degrees. For example, I have ampl. vs time at 5 degrees, 10 degrees, 15, etc. For angles 0 to 360 at increments of 5, I would like to plot each time series on a circular, or polar plot.
I am attempting to do this with matplotlib and the projection='polar' flag on. There are 8000 amplitude values for each time-series. They are in a numpy array called data. To test plotting the time-series associated with 5-degrees, I made a numpy array of 8000 5's with 5*np.ones(8000) so that they are the same length.
thetas=np.arange(0,365,5) #make 0 to 360 degrees at increments of 5
ax=plt.subplot(111,projection='polar') #turn on polar projection
ax.plot(5*np.ones(8000),data)
plt.show()
I get:
You can see these data are not plotting along the 5-degree line, nor does it look like any amplitudes are showing (there should be squiggles up and down varying with time). Thank you in advance!
EDIT: Example of what I want (each color line is a different time-series)

gnuplot projecting contuer to the XZ and YZ plane

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.

Converting 2D Plot to 3D

I'm looking to make do the following with my 2D graph as shown: I want to make a surface plot of gamma vs. J vs h. However I am not sure how to incorporate h. gamma and J are arrays made up of 26 points each. How do I make h fit into this plot if it only has one specific value for each plot?
in my final paper I needed to create a 3d graph, on this occasion the graph was a cross of latitude, longitude and radioactive intensity. I used the plotly, check if it's help you plotly documentation.
My graph created with this biblioteca

Gnuplot: 3D plot scattered data with color

How can I plot (many) uncorrelated points from a data file in 3D with color corresponding to the value of one column? The color-value is non-integral.
======================================================================
details:
I have a large data file with three columns of the form
longitude latitude color
The data is scattered and uncorrelated, i.e. no underlying grid and no relationship between the points (except that every coordinate appears only once). color is an arbitrary scalar. I know the min and the max value of that, and would like to have linear scaling of the color in between. Which colormap is not clear atm, a first step would be to produce any meaningful output.
How can I plot dots on the longitude-latitude coordinates on the unit sphere (i.e. radius = 1) with the specified color?
No interpolation is wanted, not even a connection between the points. (I'm also happy for suggestions how to do that in an easy way, but it's actually not important)
This is how far I've gone, but the coloring is missing:
set mapping spherical
splot 'the_file.data' u 1:2:(1)
Thanks a bunch!
You can use linecolor palette, which allows you to specify an additional column which is used to select the respective color from the current palette:
set mapping spherical
splot 'the_file.data' using 1:2:(1):3 linecolor palette

custom y scale in plot for

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

Resources