-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Setting style defaults for errrobar in rcParams #8071
Copy link
Copy link
Closed as not planned
Labels
New featurestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: rcparams
Milestone
Metadata
Metadata
Assignees
Labels
New featurestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: rcparams
I have been trying to write a series of functions that set up default plotting styles for publication quality figures and I noticed something. It is not possible to set the default errorbar settings using rc. The errorbar styling is inherited from the line style (all except the errorbar end cap, which can be set independently). This makes sense if you do not want to plot the error bars differently to the data points. But if you do, it is not possible to explicitly set the defaults without altering the line properties.
For example, if I wish to plot data using black points with thinned lightgrey (de-emphasised) error bars and then over plot a thicker best-fitting line in red, I have to adjust the line parameters to correctly plot the error bar and then revert them back to plot the best fitting line.
I know the errorbar styling can be set in each call to errorbar but for many plots explicitly setting the default errorbar parameters seems cleaner. Another option a colleague suggested was to just wrap up errorbar in a few function.
I thought I'd point this out as some things (e.g. line and boxplot) have a full set of toggles in rc and others (e.g. scatter and errorbar) do not. I think it would be nice for them all to have independently adjustable settings. Of course feel free to ignore this :) Thanks.