Questions tagged as 'ggplot2'

1
answer

Nesting error

I need to make a graph in concatenated R, it's 4177 iterations, I'm using ggplot2, but it's giving the error below: Error: evaluation nested too deeply: infinite recursion / options(expressions=)? Error during wrapup: evaluation nested too dee...
asked by 10.05.2016 / 06:12
1
answer

How to plot multiple graphs on an A4 sheet with defined margins?

To illustrate the question I considered the hypothetical situation below using the ggplot2 and gridExtra libraries. library(ggplot2) library(gridExtra) df<-data.frame(x=1:10,y=1:10) a<-ggplot(data = df, aes(x = x, y=y^...
asked by 10.12.2015 / 05:55
1
answer

LineType and shape in ggplot2 in R

I'm using the following code to plot 3 functions: ggplot(data.frame(x = c(0, 2)), aes(x)) + stat_function(fun = exp, geom = "line")+ stat_function(fun = dnorm ,geom = "line")+ stat_function(fun = cos, colour = "blue") Iwouldlik...
asked by 26.08.2017 / 15:46
1
answer

How to make the chart start on the y-axis through ggplot?

Hello, I'm trying to get the chart below to start on the y-axis, but I'm not getting it. The idea is to bring the first value of the x-axis, the time 6h, to the value 0 of the y-axis. Below is the script used and the image obtained. Can an...
asked by 01.12.2016 / 19:47
1
answer

Overlay graphics with ggplot2?

I'm learning how to use ggplot2 and would like to make a graph and then overlap a point in it. For example: set.seed(1) a = data.frame(X1 = rnorm(3), X2 = rnorm(3)) g <- ggplot(a, aes(x = X1, y = X2), colour="black",...
asked by 12.04.2016 / 23:19
2
answers

Reproduce graph of ggplot2 using multiple facets

I built the chart below using the grid.arrange command of the gridExtra package, I would like to leave it with the visuals of the multi-faceted graphs, using the sample size as a facet, is it possible? library(ggplot2) library(gr...
asked by 21.04.2017 / 03:59
1
answer

Graphic by ggplot in RStudio v 1.1.463 does not read subtitle and caption in labs ()

I have the problem reported in the title and I do not understand why in RStudio subtitle and caption are not read. When I replicate the code in Visual Studio, it loads all the commands correctly - the graphic looks exactly like it is in the code...
asked by 30.12.2018 / 18:42
1
answer

How do I make an NMDS chart?

I'd like to show the species in the NMDS chart. I can only show the points of the communities in each group, but I would like to show the species. My chart looks like this:     
asked by 02.08.2018 / 21:21
1
answer

Plot 2 graphs on one axis and y with different scales

Hello, masters of data analysis I have a problem with plotting two graphs with different scales on the y-axis, the left-hand ones represents unity and the right ones represent Dia. I tried to find some information about it, most of the inf...
asked by 21.02.2018 / 13:49
2
answers

Error in a - b: non-numeric argument to binary operator

Q {r} cambio2 <- data.frame(cambio) cambio2 %>% ggplot(aes(y = receita, x = despesa ) ) + geom_point() I want to make the chart, but the points in the graph do not appea...
asked by 26.07.2018 / 20:29