Questions tagged as 'ggplot2'

2
answers

How to properly position the labels in the barplot?

I can not correctly position the names in an R barplot because they are too long. My data looks like this: Thenamesendupappearingthisway: fator_tecnologico_labels <- c( "Facilidade de testar\n e de ser avaliado\n por usuários\n de um m...
asked by 14.01.2014 / 19:09
2
answers

Modifying colors in graphics in ggplot2

How do I change the colors of the graph in ggplot? Type, I'm not able to put a continuous color scale between white and red, I've tried a variety of things but have not yet answered. library('ggplot2') Tipo = c("Casa", "Rua", "Bairro", "M...
asked by 13.06.2018 / 06:11
1
answer

How to fill column graphics with hachures using ggplot2

I would like to display column graphs, using ggplot2 , but would like to fill them with hachures. It makes it easier to understand in case of black and white photocopy! Using the base date cars and the command below as an e...
asked by 03.12.2018 / 14:08
2
answers

How to smooth a curve in the R

The goal is to get the data.frame x <- c(1e-04, 0.0014, 0.018, 0.24, 3.2, 42, 560, 7500, 1e+05) y <- c(0, 7, 10, 7, 0, -7, -10, -7, 0) df <- data.frame(x, y) The curve generated by library(ggplot2) ggplot(data = df, aes(x, y))...
asked by 03.03.2014 / 18:48
1
answer

Edit bar graph in R: Order of X-axis values - Legend - Bar color - Insert lines - Enter comments

1 - Contextualization I want to build a bar chart using ggplot2 , but I'm having trouble gathering the information and editing the chart. I have data of the oscillation of the phenomenon El niño ( ONI ) classified in intervals. With t...
asked by 04.07.2016 / 06:14
1
answer

How to put the regression equation on a graph?

In another question , and how to put the regression line on a graph. But how to put the regression equation on the graph? For example: Or     
asked by 22.02.2014 / 14:55
2
answers

Connecting the points to the regression line

Suppose the following database: Income <- structure(list(X = 1:30, Education = c(10, 10.4013377926421, 10.8428093645485, 11.2441471571906, 11.6454849498328, 12.0869565217391, 12.4882943143813, 12.8896321070234, 13.2909698996656, 13.732441...
asked by 02.04.2014 / 14:51
1
answer

Size of the panels with facet_wrap

I'm doing some panel graphics in ggplot2 . See the example below: library(ggplot2) ggplot(mpg, aes(x=displ, y=hwy)) + geom_point() + geom_smooth(method="lm", se=FALSE, colour="black") + facet_wrap(~ trans) Ihavemygraphicalwindo...
asked by 13.09.2018 / 18:15
1
answer

How to create a plot with 2 superimposed histograms?

Suppose I have the following data from 2 distinct groups. set.seed(1) grupo1<-rnorm(400,6,2) grupo2<-rnorm(200,8,2) How do I make a histogram of the two groups on the same screen, identifying each of the groups with a distinct color a...
asked by 21.02.2014 / 01:11
1
answer

Plot 3D figures for list data

I have a a list with three arrays and a v vector with three frequencies (any positive real ones), these arrays form triangles through a function that created pplot . I want to add the information of v to build prisms,...
asked by 15.11.2016 / 05:12