Questions tagged as 'ggplot2'

2
answers

How to insert caption in graph with two axes and in r?

How do I insert the legend in this chart, what kind of bar would be the gross total and the line the total net? lines = 'Mes Acid Obt Jan 1450 102 Fev 1447 86 Mar 1461 87 Abr 1356 61 Mai 1398 80 Jun 1115 87 Jul 1211 82 A...
asked by 19.06.2018 / 17:54
1
answer

overlapping histrograms

Good morning. I would like to create a histogram with 26 species on the x-axis and the percentage of commercial hunting influence on the reduction of each species (column '' depletion_rate '') on the y-axis. I would also like to overlap the histo...
asked by 13.12.2018 / 15:27
2
answers

Play a chart in the R

I made chart 1 below in R, from the code: library(truncreg) set.seed(1) x <- sort(rnorm(50)+3) y <- 3 + 1*x + rnorm(50,0,0.3) compl <- data.frame(x,y) y[y>6.5] <- 6.5 sample <- data.frame(x,y) pred.OLS <- predict(...
asked by 26.06.2017 / 01:40
1
answer

Ggplot of a Data.frame in separate charts

I have this data.frame: > df ind m X1 X2 1 2015-12-21 21 0.1431529 0.1426365 2 2015-12-21 42 0.1403679 0.1443714 3 2015-12-21 63 0.1467133 0.1466899 4 2015-12-21 84 0.1513388 0.148...
asked by 28.12.2015 / 22:50
1
answer

How to change the font in a chart in R?

I want to use use the font Times New Roman in the chart, but the R / rstudio returns an error message saying can not find it. Obviously the font is somewhere because I use it in MS Word , for example. Some time ago the following command...
asked by 03.12.2017 / 22:34
1
answer

Column graph of a Data Frame using GGPLOT

I have this data.frame: A K1 B K2 C K3 D K4 E K5 1 0.89386498 0.239258200 -0.004970278 0.99477685 -0.243845617 0.80370370 0.3132989 0.637155451 -0....
asked by 10.08.2016 / 18:14
1
answer

Graph of interaction in ggplot2

I'm trying to adapt some of the standard R graphics to the ggplot2 style. One of the charts I want to do this is the interaction graph in a linear model fit study. The following data were taken from Example 9-1 in Douglas C. Montgomery...
asked by 15.12.2016 / 19:45
1
answer

Presentation of data in ggplot2

Hello, I'm having problems with ggplot2 in a histogram. The code: ggplot(data.combined[1:891,], aes(x = Age, fill=Survived)) + facet_wrap(~Sex + Pclass) + geom_histogram(binwidth = 10) + xlab ("Age") + ylab ("Total Count") Wi...
asked by 22.05.2016 / 18:51
2
answers

How to change the orientation of the "Key" of a Legend in ggplot?

How can I change the caption key below so that it is in the horizontal position without changing the vertical lines of the chart. Also, how do you leave the caption background with the same color as the first layer (or "layer") of the graphic?...
asked by 21.03.2017 / 20:58
1
answer

Add 3 graphs using plot

I want to merge the three graphs below using the plot function. I do the basics starting with the command par(mfrow=c(1,3)) but I can not join them. The problem I believe is that it is using a direct summary object of the quanti...
asked by 14.09.2016 / 00:21