Group Abstract Group Abstract

Message Boards Message Boards

0
|
303 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How to make colors in BoxWhiskersChart identical to default colors in ListPlot?

Posted 21 days ago

I am using Wolfram 14.0. And I would like the color of the bars in the BoxWhiskersChart to be identical to the colors in ListPlot. That is, in the BoxWhiskersChart, I would like the color of the box for dataset1 to be the orange color used in the ListPlot, and I would like the color of the box for dataset2 to be the blue color used in the ListPlot.

POSTED BY: Michael O'Connor
3 Replies
Posted 20 days ago

The default list of colors that get used for plotting multiple datasets appears to be the last "Indexed" color scheme, number 116. I can't find this documented anywhere though, so I don't know how likely this might be to change in the future. Here's a notebook that I think does what you're looking for:

POSTED BY: Brad Chalfan
Posted 17 days ago

Try this:

dataset1 = RandomVariate[NormalDistribution[10, 2], 100];
dataset2 = RandomVariate[TriangularDistribution[{8, 12}], 100];
BoxWhiskerChart[{dataset1 -> Orange, dataset2 -> Blue}]

enter image description here

POSTED BY: Hans Milton

Thank you! This is very helpful!!!

POSTED BY: Michael O'Connor
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard