Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.9K Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How to change the color of histograms to Parula color?

Posted 3 years ago

Hello, I would like to change the color of my histograms to the Parula color of matlab, change

ChartStyle -> "Pastel", ChartStyle -> "Parula"

How can I do it?,

data1 = RandomVariate[NormalDistribution[0, 1], 500];
data2 = RandomVariate[NormalDistribution[3, 1/2], 500];
data3 = RandomVariate[NormalDistribution[5, 1/3], 500];


Histogram[{data1, data2, data3}, PlotRange -> All, 
 ChartStyle -> "Pastel", ChartLegends -> {"3Er", "4Er", "5Er"}]

Other question

How can I change a density plot with parula color?

2 Replies
Posted 3 years ago

Hi Luis,

Take a look at this answer on MSE. ParulaCM is a ColorFunction so you will have to sample three values and use them for ChartStyle in your example.

POSTED BY: Rohit Namjoshi

Hi Rohit Namjoshi. Thank you so much.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard