# Plot KMZ file in Python

**URL:** <https://forum.generic-mapping-tools.org/t/plot-kmz-file-in-python/1135>\
**Category:** PyGMT Q&A\
**Tags:** gmt\
**Created:** [December 16, 2020, 2:31pm UTC](https://forum.generic-mapping-tools.org/t/plot-kmz-file-in-python/1135 "2020-12-16T14:31:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![seismiclover](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@seismiclover](https://forum.generic-mapping-tools.org/u/seismiclover)\
**Post date:** [December 16, 2020, 2:31pm UTC](https://forum.generic-mapping-tools.org/t/plot-kmz-file-in-python/1135/1 "2020-12-16T14:31:27Z")

</div>

Hello, I have KMZ file which includes the fault lines. I want to plot them but when i try to plot with pygmt plot module, it gives me error because of format of kmz. How can i plot the fault lines or how can i convert this kmz file into txt to be able to plot it.  
Thanks.

---

<div class="post-metadata">

**Author:** ![weiji14](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/weiji14/32/33_2.png) [@weiji14](https://forum.generic-mapping-tools.org/u/weiji14)\
**Post date:** [December 17, 2020, 2:56am UTC](https://forum.generic-mapping-tools.org/t/plot-kmz-file-in-python/1135/2 "2020-12-17T02:56:23Z")

</div>

Hi @seismiclover, you might find the post overt at [Pygmt plotting multiple lines](https://flint.soest.hawaii.edu/t/pygmt-plotting-multiple-lines/102/3) helpful. Depending on how you KMZ file looks like, there’s a chance you’ll need to convert the KMZ file into something else (either using `kml2gmt` or `ogr2ogr` as mentioned in [https://github.com/GenericMappingTools/pygmt/issues/382](https://github.com/GenericMappingTools/pygmt/issues/382)).
