YinLiLin / CMplot

📊 Circular and Rectangular Manhattan Plot
520 stars 112 forks source link

Parameterize point transparency #65

Closed mschilli87 closed 2 years ago

mschilli87 commented 2 years ago

The alpha value for used in points() calls is hard-coded to 100.

This PR introduces a new parameter points.alpha to allow the user to overwrite this default. It comes with basic input validation to ensure the specified value is in the valid range from 0 (fully transparent) to 255 (fully opaque). Also, for convenience, points.alpha=FALSE is accepted as a shorthand for full opaqueness. Conversely, points.alpha=TRUE results in the same default (previously hard-coded) transparency level of 100 that is used when not specifying the parameter at all.