PPSD percentiles in different colours

Hi,
I am just wondering if there is a way to draw PPSD percentiles in different colours?

e.g.

PPSD.plot(period_lim=(0.01, 100), show_percentiles=True,
percentiles=[10,50,90],xaxis_frequency=True, cmap=pqlx,
show=False,show_coverage=True)

How do I make 10%, 50%, and 90% percentiles appear in three different colours without
having to use get_percentiles?

Many thanks!

Januka

Hi Januka,

you can not specify custom colors with the below call.
Two options:

  - get data with get_percentiles() and plot it into the figure you make
    with PPSD.plot() yourself

  - use PPSD.plot() and modify the line colors on the plot afterwards using matplotlib API (Axes object has them stored in an attribute "lines" I believe, you can set a different color on these objects with matplotlib API https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D.set_color)

best,
Tobias

Hi Tobias,

Following PPSD issue, I wonder if obspy already included or is planning infrasound high/low noise model for infrasound background noise analysis?

I did my infrasound PPSD using the model data from Bowman, J.R., G.E. Baker, and M. Bahavar, Ambient infrasound noise, Geophys. Res. Lett., 32, L09803, doi: 10.1029/2005GL022486, 2005.

See if we could adopt these into PPSD class?

Thank you!

Best,
Youngman

infrasound PPSD.png

noise_models_Bowman_ITW_2009.txt (4.12 KB)

Thanks Tobias, will try to give it a go!

Januka Attanayake

Research Fellow | Earthquake Seismology
Homepage: https://sites.google.com/site/janukaattanayake

School of Earth Sciences | McCoy Bldg. 200
University of Melbourne | Parkville 3010 VIC
Australia

Hi Januka,

you can not specify custom colors with the below call.
Two options:

best,
Tobias