<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/plot-colour-helper-finally-an-easy-way-to-pick-colours-for-your-r-plots/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://deanattali.com/blog/plot-colour-helper/"> Dean Attali's R Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>You’ve just made an amazing plot in R, and the only thing remaining is finding the right colours to use. Arghhh this part is never fun… You’re probably familiar with this loop: try some colour values -> plot -> try different colours -> plot -> repeat. Don’t you wish there was a better way?</p>
<p>Well, now there is <img alt="🙂" class="wp-smiley" src="https://s.w.org/images/core/emoji/2/72x72/1f642.png"></p>
<p>If you’ve ever had to spend a long time perfecting the colour scheme of a plot, you might find the new Plot Colour Helper handy. It’s an RStudio addin that lets you interactively choose combinations of colours for your plot, while updating your plot in real-time so you can see the colour changes immediately.</p>
<p><a target="_blank" rel="nofollow" href="https://i2.wp.com/raw.githubusercontent.com/daattali/colourpicker/master/inst/img/plothelper-demo.png?ssl=1"><img alt="Demo of colour picker addin" src="https://i2.wp.com/raw.githubusercontent.com/daattali/colourpicker/master/inst/img/plothelper-demo.png?w=456&ssl=1" data-recalc-dims="1"></a></p>
<p>This new tool is available from the <a target="_blank" rel="nofollow" href="https://github.com/daattali/colourpicker">colourpicker package</a>.</p>
<p>To use this tool, either call the <code>plotHelper()</code> function or highlight code for a plot and select the addin through the RStudio Addins menu. The colours you select in the tool will be available to your code as a variable named <code>CPCOLS</code>.</p>
<p>The Plot Colour Helper has many little extra features that are designed to make working with it as efficient as possible. For example, you can initialize the tool with a specified set of colours or you can let the tool guess how many colours are needed based on your plot code. There are also several keyboard shortcuts for your convenience.</p>
<p>Here is a short demo of the tool:</p>
<p><a target="_blank" rel="nofollow" href="https://i1.wp.com/raw.githubusercontent.com/daattali/colourpicker/master/inst/img/plothelper-demo.gif?ssl=1"><img alt="Plot Colour Helper demo" src="https://i1.wp.com/raw.githubusercontent.com/daattali/colourpicker/master/inst/img/plothelper-demo.gif?w=456&ssl=1" data-recalc-dims="1"></a></p>
<p>Fun fact: this tool was born thanks to my girlfriend’s blunt feedback. I had previously made a Colour Picker addin, which lets you select colours in RStudio and get the resulting colour list as a vector. When I saw my girlfriend creating lots of plots for her thesis and spending a lot of time on colour selecting and re-plotting, I told her she can use my Colour Picker to help with the process. She told me that it’s pretty much useless since she can’t actually see the plot update while choosing colours. So me, being the best boyfriend in the universe (and an R addict), I immediately proceeded to create the Plot Colour Helper for her. And for all of you!</p>
<p>Go ahead and install <a target="_blank" rel="nofollow" href="https://github.com/daattali/colourpicker"><code>colourpicker</code></a> to get started. I hope you find this addin useful, and as always – <a target="_blank" rel="nofollow" href="http://deanattali.com/contact/">feedback is welcomed</a>.</p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://deanattali.com/blog/plot-colour-helper/"> Dean Attali's R Blog</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/Pk6N4bFmnC0"></a></div>