Skip to main content

Questions tagged [ggplot2]

ggplot2 is an actively maintained open-source chart-drawing package for R, written by Hadley Wickham, based upon the principles of "Grammar of Graphics". It partially replaces R's basic plot and the lattice package, while providing a clean, powerful, orthogonal and fun API.

0 votes
1 answer
47 views

I am looking for learning material for R (including base R & tidyverse approaches (with a focus on readr, dplyr & tidyr)) and data visualisation using ggplot2 library for commercial teaching ...
Hamideh's user avatar
  • 942
0 votes
1 answer
143 views

In ggplot2 package documentation for geom_freqpoly, there is a formula in the last example which use a function to dynamically ...
rez's user avatar
  • 113
0 votes
1 answer
6k views

I have an issue with the "ggplot2"-package, where I cannot get the linetypes in the legend. The legnd only shows the color of each line, but not the specific type. My code looks like: <...
AndersMax's user avatar
1 vote
1 answer
583 views

I made the following contingency table already, however there should only be TRUE or FALSE and not all of them showing up on the table. How can I change that? my code is the following: ...
Bert's user avatar
  • 25
1 vote
0 answers
82 views

I'm studying PCA method with the package PCAmixdata because I have a dataset with numerical and categorical variable. This is my example code in R: ...
Inuraghe's user avatar
  • 491
0 votes
1 answer
3k views

Context: I am trying to change the legend labels for the Indices variable which contains "Positive" and "Negative" in "d_posneg" data frame. Problem: However, my ...
n.baes's user avatar
  • 39
2 votes
0 answers
481 views

I am new to R. While working on my university assignments, I found that legends for Base R plot do not show correct information, hence I switched to ggplot2 wherever legends were needed. I observed ...
Vanjuli's user avatar
  • 21
1 vote
1 answer
62 views

I have a data.frame that have two cols, $x=mz$ and $y=res$. There are about ~2 million rows in the DF. When I plot the graph I get the below. What I'd like to do is ...
V. Lad's user avatar
  • 11
1 vote
1 answer
209 views

I have made a cluster analysis and ended up with dendrogram; however the row names are not readible (made a red rectangle). May I ask if there is way to adjust it? ...
Lola Kpiani's user avatar
1 vote
1 answer
172 views

I would like my ggplot to display the state I had selected for better clarity but it seems like glue is only seeking for the first observation rather than my desired output. ...
zher4883's user avatar
0 votes
1 answer
2k views

In my dataset, I have two numeric revenue features, one for each month, and two categorical features one for region and other for value segment. what I want to do is compare these two revenues col by ...
Ehsno's user avatar
  • 3
0 votes
1 answer
2k views

I am trying to plot a box plot with the Trinucleotide as the x axis (so 64 trinucleotides on the x axis) and the frequency of each trinucleotide in each of 6 samples then color code the plot according ...
user14687500's user avatar
1 vote
1 answer
669 views

So I'm trying to create a simple bar chart of Survive vs Not Survive for the common Titanic data set in R. I keep getting just the number of No's and Yes's, and not the frequencies or counts ...
redfish993's user avatar
1 vote
1 answer
2k views

I am working with single time-series measurements that I want to plot for the time window of about 1 week. This is the data I am working with. This is my R script: ...
Livingsten's user avatar
2 votes
0 answers
869 views

I added r2 value and the formula of the regression function but I also want RMSE value on my plot, maybe I need to add something but I could not see a proper answer to this question neither here nor ...
RS_girl's user avatar
  • 21

15 30 50 per page