# Plot the rupture area of a set of earthquakes in 2D map in GMT

**URL:** <https://forum.generic-mapping-tools.org/t/plot-the-rupture-area-of-a-set-of-earthquakes-in-2d-map-in-gmt/1963>\
**Category:** PyGMT Q&A\
**Created:** [August 8, 2021, 11:28pm UTC](https://forum.generic-mapping-tools.org/t/plot-the-rupture-area-of-a-set-of-earthquakes-in-2d-map-in-gmt/1963 "2021-08-08T23:28:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aedmpygmt](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@aedmpygmt](https://forum.generic-mapping-tools.org/u/aedmpygmt)\
**Post date:** [August 8, 2021, 11:28pm UTC](https://forum.generic-mapping-tools.org/t/plot-the-rupture-area-of-a-set-of-earthquakes-in-2d-map-in-gmt/1963/1 "2021-08-08T23:28:52Z")

</div>

Hi friends

I would like to plot the rupture area of a set of earthquakes in GMT (anaconda-spyder) for my paper. I have the data of the: length, width and direction for each earthquake, and I would prefer to plot this area as an ellipse error. I have tried with the following piece of code:

```python
import os
import pygmt as gmt

direc = 'D:\\fold_AEDM_DoctoradoCI_PUC\\FOLD_Cursos_Doctorado\\fold_ING5250_Autoria-Articulo_Publicacion-Revista\\fold_RA-Outline_CDP0006\\fold_Figuras\\Figure_1\\fold_Fig1_GMT\\'
os.chdir(direc)

#gmt.show_versions()

gmt.config(MAP_FRAME_TYPE='plain')
gmt.config(FORMAT_GEO_MAP='ddd')

## generación de la clase fig
fig = gmt.Figure()

## Construcción de la base
region = [-85, -60, -57, -15]
projection = 'M10c'
fig.basemap(region=region, projection=projection, frame=['ag', 'WSne'])

## Construcción de la línea de la costa
shorelines = '0.5p,blue,solid' ## True
water = 'lightblue' ## 'lightblue', 'skyblue', 
land = 'goldenrod' ## 'brown', 'gold', 'goldenrod'
borders = '1/0.7p,black,solid'

## Despliegue del área de ruptura de un terremoto
long = -74.500; lat = -39.500 ### Terremoto 1960, Mw=9.5
L = 1000; W = 200 ## distancias en (km)
fig.plot(x=long, y=lat, style='e90/1000/200i', color='red', pen='black')
fig.coast(shorelines=shorelines)

### Ayuda a coordenadas que aparescan visibles en el mapa
fig.basemap(region=region, projection=projection, frame=['ag', 'WSne'])

## Se muestra la figura
fig.show()

```

However, the plot does not result ok. It means, the ellipse is much bigger than the map ¿Could you suggest any way to plot this type of information? I mean, the size of the ellipse is been concordant with the map

```
                Greetings Adrián
```

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [August 8, 2021, 11:43pm UTC](https://forum.generic-mapping-tools.org/t/plot-the-rupture-area-of-a-set-of-earthquakes-in-2d-map-in-gmt/1963/2 "2021-08-08T23:43:36Z")

</div>

Looks like you are specifying Cartesian ellipses as 100 x 200 inches, which is not what you want. Since you mean km, you need style E, not e, and no trailing _i_.

---

<div class="post-metadata">

**Author:** ![aedmpygmt](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@aedmpygmt](https://forum.generic-mapping-tools.org/u/aedmpygmt)\
**Post date:** [August 13, 2021, 8:51pm UTC](https://forum.generic-mapping-tools.org/t/plot-the-rupture-area-of-a-set-of-earthquakes-in-2d-map-in-gmt/1963/3 "2021-08-13T20:51:19Z")

</div>

Hi pwessel

Thanks a lot, it plots ok. when i change e to E and trailing i.

```
            Best regards
```
