Hey folks, I hope you’re enjoying my new approach of integrating the newsletter with my YouTube videos. The feedback I’ve gotten has been very positive. Thank you! I’d love it if you were to reply to this email with a link to the most recent figure you found in your reading of the literature or popular media. This week, I’m sharing with you Figure 5D from a paper recently published in mSystems by Charlie Bayne and colleagues where they looked at the effect of interactions between tryptophan and copper on the toxicity of colibactin. This toxin is produced by a strain of E. coli that has been associated with colorectal cancer. This specific panel shows that the ClbP enzyme is inhibited by increasing concentrations of copper using a fluorescence-based assay; I think the 7H4M is a control to see if copper effects fluorescence on its own. Anyway, I want to encourage you to ask some questions about any plot you find to help you develop your taste and and think through how you would recreate elements of a plot. What type of plot is this? Aside from the data story, what is interesting about this figure? What do you like about it? What don’t you like about it? Can you outline the steps you would take to generate the figure? What are some of the steps you aren’t sure about and would like to learn? First off, the figure is made up of box plots for two treatments depicting the amount of fluorescence at different dilutions of copper. I think this plot was made in R because of the styling of the legend and the other figures in the paper. It appears to me that the box plots are evenly spaced, which suggests that the authors didn’t map the copper concentration to the x-axis and then dodge the box plots by treatment. I’d likely do this by creating a column of concentration-treatment combinations and map that to the x-aesthetic and the percent fluorescence to the y-axis. I’d also map the treatment to the color of the box plot. Second, assuming I’m correct about how they fashioned the x-axis, it’s likely treated each concentration-treatment combination as a unique treatment. They then re-labelled the x-axis with the concentration. I think I would do this with Third, on top of the box plots they have overlaid their triplicate data for each condition as jittered points. As an aside, I feel like the figure probably should have picked one geom and run with it. As you can see the middle of the three points falls on the median line and the other two points fall on the ends of the box plots’ whiskers. The box plot doesn’t really add much. Anyway, I’d use Finally, they moved the legend inside the plotting window and put a black border around the legend. I like that approach since it frees up room in the plot by getting rid of the right margin where the legend normally sits. By putting a black border around the legend, it says “this is the legend, these box plots are legend glyphs and not data”. Aside from questioning whether we really need the box plots with the raw data, I have some other thoughts about this figure that I’d like to try. First, I’d be interested in trying to plot a line through the mean of the three points for each concentration-treatment combination. I’d color the points and the two line by the treatment. Second, I’d like to try putting the x-axis on a log scale. That’s basically what it is, right? The one problem would be the zero since you can’t have zero on a log scale. If you want to give these ideas a try before I get to them in December, here’s some code to give you a data frame that you could use to play with:
|
Hey folks, If you’re interested in participating in a 1-day (6 hours) data visualization workshop, you’re running out of time to register. I’ll be teaching this workshop on May 9th. I will cover an introduction to the ggplot2 package and will assume no prior R knowledge. My goal is to help you to understand the ggplot2 framework and begin to apply it to make some interesting and compelling visualizations. After this workshop, you should be able to learn more advanced topics on your own. You...
Hey folks, I’m gearing up to teach a 1-day (6 hours) data visualization workshop on May 9th. This workshop will cover an introduction to the ggplot2 package and will assume no prior R knowledge. My goal is to help you to understand the ggplot2 framework and begin to apply it to make some interesting and compelling visualizations. From this workshop, I hope that you would be able to go off on your own journey learning more advanced topics. You can learn more and register by clicking the button...
Hey folks, Long time friends of Riffomonas know that I’ve been teaching data science classes for close to 20 years. The hallmark of my teaching has been three-day workshops where I either teach R (here and here) or the mothur software package. I’ve gotten feedback that three days is just too much time for people to carve out of their busy schedules. So, I’m excited to be offering a 1-day (6 hours) data visualization workshop on May 9th. This will cover an introduction to the ggplot2 package....