spedas / pyspedas

Python-based Space Physics Environment Data Analysis Software
https://pyspedas.readthedocs.io/
MIT License
147 stars 58 forks source link

lineplot uses incorrect options for error bar plots #1009

Closed jameswilburlewis closed 1 week ago

jameswilburlewis commented 1 week ago

With standard matplotlib line plots, the 's' keyword argument is used to specify marker sizes This is incorrect for error bar plots: 's' is an unrecognized keyword, and the line style, symbol, and color are all combined into a 'fmt' argument, which lineplot is not setting properly.

See: https://github.com/spedas/pyspedas/issues/1008

jameswilburlewis commented 1 week ago

Actually there was some confusion (on my part) about error bar plots without connecting lines, and scatter plots where symbols=True (which wouldn't show error bars). The way to get error bar plots without the line traces is to set the 'linestyle' option to the string 'None'. I've adjusted the lineplot code, tests, and example notebooks to reflect this.