Tag: Ggplot2
Posts of Tag: Ggplot2
  1. How to order breaks with ggplot / geom_bar

    I have a data.frame with entries like: variable importance order 1 foo 0.06977263 1 2 bar 0.05532474 2 3 baz 0.03589902 3 4 alpha 0.03552195 4 5 beta 0.0348...Learn More
  2. ggplot2: separate color scale per facet

    Intuitively I'm looking for something like: facet_(scales="free_color") I do something like p <- ggplot(mpg, aes(year, displ, color=model)) + facet_wrap(~manufacturer) p + geom_jitter() That is: plot 2d...Learn More
  3. Creating a Pareto Chart with ggplot2 and R

    I have been struggling with how to make a Pareto Chart in R using the ggplot2 package. In many cases when making a bar chart or histogram we want items sorted by the X axis. In a Pareto Chart we want the items ...Learn More
  4. facet_grid problem : input string 1 is invalid in this locale?

    I am trying to create facet grid with the following code p <- ggplot(melted,aes(factor(country))) + geom_bar() +opts(axis.text.x = theme_text(angle = 90,hjust = 1)) p + facet_grid(. ~ provider) but ...Learn More
  5. R: Creating Custom Shapes with ggplot

    Full Disclosure: This was also posted to the ggplot2 mailing list. (I'll update if I receive a response) I'm a bit lost on this one, I've tried messing around with geom_polygon but successive attempts seem wor...Learn More
  6. How to create R custom visual (html) in PowerBI

    PowerBI offers some great native and custom visuals that integrate and interact almost perfect together. But many times we need a visual that either doesn’t exist or doesn’t offer the functionality we want. Th...Learn More
    NewsPower BiGgplot2RstatsPower Bi Desktop
  7. ggplot: boxplot sort

    How do I sort a boxplot in ggplot? Here's what I'm trying to plot: qplot( row.names(pcaDF),pcaDF[,1],data=pcaDF,geom="boxplot") + coord_flip() and here's the structure of pcaDF > str(pcaDF) 'data.fram...Learn More
  8. Practical Linear Regression with R: A case study on diamond prices

    I’m still taking the Regression Models course of John Hopkins University in Coursera but I already got motivated in writing my first article in LinkedIn talking about a simple regression problem, and I will use...Learn More
    NewsLinear RegressionR ProgrammingGgplot2Diamonds
  9. Add subgroup labels to a jitter plot in ggplot2

    I have a nearly-boxplot like jitter-plot: dt <- rbind(se,cb,cb.se) qplot(ds, size, data=dt, geom="jitter", colour=root, facets = test ~ .) I'd love to put a summary label for each group in the middle o...Learn More
  10. Analysis of US presidential election 2020

    Harshita Garg The US presidential election 2020 was full of drama, excitement, confusion and controversies. The whole world watched with bated breath as Joe Biden was declared winner, despite Trump’s continued...Learn More
    Newsdata scienceVisualizationData AnalysisGgplot2Us Election2020
  11. Matplotlib VS Ggplot2

    Back story I primarily work in python, but I needed to use R for a few recent projects. There are a lot of differences between R and Python, but the graphs grated me the most. The visualizations produced in R ...Learn More
    Machine LearningNewsdata sciencedata visualizationmatplotlibGgplot2
  12. facet label font size

    is there a way to change to font size of facet labels in ggplot? I google a bit and found that that issue was yet on Hadley's to do list. I wonder if there's a workaround or any news on this issue. Thx for sh...Learn More