Questions tagged [pygmt]

PyGMT is a library for processing geospatial and geophysical data and making publication quality maps and figures.

PyGMT is a library for processing geospatial and geophysical data and making publication quality maps and figures. It provides a Pythonic interface for the Generic Mapping Tools (GMT), a command-line program widely used in the Earth Sciences.

16 questions
8
votes
2 answers

Pygmt : how to fill polygons with cmap color

Good morning, I am using pygmt on python 3.6 with spyder. I am trying to fill several polygons in a range of colors defined by a colorpalet. I used makecpt to define the colorpalet. The variable I want to represent is Mog. My code is…
an jo
  • 83
  • 4
1
vote
1 answer

Python plot signals based on the azimuth of arrival?

I'm trying to make a plot of a signal, where the orientation of the signal on the plot is the azimuth the signal originated from. My initial thought was to use a polar projection, but I don't actually want the signal itself to be converted into…
Andrew Bolton
  • 73
  • 1
  • 7
1
vote
0 answers

How will I fix this pkg_resources.DistributionNotFound: The 'pygmt' distribution was not found and is required by the application

I have a python code that contains pygmt module/package. I converted this code into an executable file using auto-py-to-exe/pyinstaller. But when you run this executable file, the window console shows this error pkg_resources.DistributionNotFound:…
Dot Dot
  • 19
  • 2
0
votes
1 answer

Is there a way to customize PyGMT legend font size?

I'm trying to change the font size of the legend in this PyGMT program, but I can't seem to find how. Here are the lines for the legend: #read Seismic stations from txt file ETNA=pd.read_csv("/Users/user/Desktop/PyGmt/ETNA.txt",…
0
votes
0 answers

Creating basic 3D Perspective Displacement model with PyGMT

I am trying to create a 3D Perspective Displacement Map from a displacement image .tif file, however i am having trouble loading in the file/ confused as to the correct way to do it. I am trying to use the pygmt.load_dataarray method however i get…
0
votes
1 answer

plot xarray Data array in pyGMT

I have a grid (xyz) that covers the entire globe. The dataset consists of multiple columns containing, longitude, latitude, and several z-values. Here are the locations of each node: Now I want to show any of the z-values using fig.grdimage.…
Geo_toto
  • 23
  • 4
0
votes
2 answers

Python PyGMT Plotting Data Points from CSV

I try the tutorial here: https://www.pygmt.org/latest/tutorials/basics/plot.html#sphx-glr-tutorials-basics-plot-py But, instead of getting their already have example of japan_quakes I create my own csv that can works for the first two examples. But…
0
votes
1 answer

Plot milepost along coastline in python

I want to plot mileposts on a map every 100 miles along the coastline. An example is shown in the figure below: It is easy to plot the coastlines using Cartopy, but how to determine the locations of these mileposts and show them on a map? It would…
Feng Hu
  • 63
  • 6
0
votes
1 answer

Use pygmt in a IDE (spyder) with conda

I'm using spyder to make my codes. I try to use pygmt lib but, in my spyder-env I have an error : GMTCLibNotFoundError: Error loading GMT shared library at 'libgmt.so'. libgmt.so: cannot open shared object file: No such file or directory According…
BenjiBoy
  • 141
  • 7
0
votes
1 answer

How interpolate latitude/longitude points from grid to reals points of interest and compute agregated values?

Please consider a df1 : df.dtypes DAT_RUN datetime64[ns] DAT_FORECAST datetime64[ns] LIB_SOURCE object LONGITUDE object LATITUDE object MEASURE1 float64 MEASURE2 float64 12…
Theo75
  • 477
  • 4
  • 14
0
votes
2 answers

Using netcdf file data in pygmt

one little question. Is there an easy way to convert netcdf file data to a grid which can be used in pygmt? Pygmt has as default example the following dataset: array([[-3539.5, -3510.5, -3557.5,…
S.Kociok
  • 168
  • 1
  • 14
0
votes
1 answer

plotting stations on map

i have three stations named as A, B, C. I want to plot them on a map using matplotlib basemap. station A: latitude=17.8 longitude=74.48 station B: latitude=-25.02 longitude=25.60 station C: latitude=44.58 longitude=-123.30 As i am new to python and…
manas
  • 479
  • 2
  • 14
0
votes
0 answers

importing Error for xarray returns "DLL load failed while importing defs"

I have tried almost all the available resources including uninstalling and re-installing to fix this issue but no luck so far. Can I have your expert advice to fix this issue... !pip install xarray Requirement already satisfied: xarray in…
0
votes
1 answer

Pygmt sort legend

I want to create a map with pygmt, where I show the tracks of 4 cruises. They do partially overlap and one cruise is of special interest to me, hence I like to have it on top. The legend, however, should be sorted by date but the desired cruise was…
hänz
  • 1
0
votes
1 answer

How to set the elevations of sea to a common negative value in GMT6.1?

I want to draw a relief of some region (sea and land involved), but I DO NOT want to show the variation of marine bathymetry, so I must set them to a common negative value to make sure that all the bathymetry map to the same color, like lightblue. I…
Jun Zhu
  • 13
  • 4
1
2