MBravoS / splotch

Simple PLOTs, Contours and Histograms is a small package with wrapper functions designed to simplify plotting calls from matplotlib.
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

Bug with tuple-specified linestyles #17

Closed MBravoS closed 4 years ago

MBravoS commented 5 years ago

base_funcs.dict_splicer() breaks when it receives a tuple specifying the linestyle of a plot. We should add a test for data type when linestyle is given as a key in plot_par, and ensure that it gets passed correctly (wrapping it in a list works fine).

AstroRobin commented 4 years ago

This also has further-reaching implications for any color being given as a tuple (e.g. (r,g,b,a)). To fix this, we can check the first element of any tuple given to dict_splicer() if it is purely a 'string' OR the first element is explicitly numeric, then it should be treated as a single value rather than a set of values for multiple lines.

MBravoS commented 4 years ago

Solve as of version 0.4.1.2.