Questions tagged as 'plot'

1
answer

How to plot a line chart with different colors depending on the value?

Suppose the following data: set.seed(1) y<-rnorm(101) x<-seq(from=0, to=100,by=1) I want to make a plot with a line that has a different color for negative values. To make a point graph, simply use the command below: plot(x,y,col...
asked by 19.03.2014 / 17:49
1
answer

How to change the distance or rotation of the axis title of a graph relative to the axis itself

I draw the chart below using the R. plot3D package. I would like to move the label of the z axis% of the axis values a bit or leave it horizontal. Does anyone know how I can proceed? Here is the code: library("plot3D") #Function density probab...
asked by 19.05.2018 / 03:02
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

Plot Main Title com Text and formula y = a + betaX + Epsilon

These are the data: a=structure(c(2.96898844129164, 2.7849952585919, 2.4022019576164, 2.97749332978932, 3.23431466394159, 3.37620019711505, 3.3295390792587, 3.11646532271242, 2.84000702738219, 2.74301542351398, 2.07832874180711, 2.157405157...
asked by 26.11.2016 / 20:26
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

How to color the legend according to the chart in R

Hello everyone, I have a chart in R and would like to make the caption equal to the chart. below is the command used and the graphic image. control = c(100,100,100,100,100) dez = c(100,90,0,0,0) cinco = c(100,100,100,50,0) dois = c(100,100,100...
asked by 24.03.2017 / 16:49
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
1
answer

How to reproduce a graph that was created with the plot command using ggplot2?

How to reproduce the graph below using ggplot2 ? I do not know how to add multiple graphs to a single layer ! bs<-function(t,mu,phi){ fdp=((exp(phi/2)*sqrt(phi+1))/(4*sqrt(pi*mu)*t^(3/2)))*(t+((phi*mu)/(phi+1)))* exp((-phi...
asked by 23.03.2017 / 19:02
1
answer

Build Accumulated Density Probability using R

I have this two-frame date frame (Y and X) With the quantreg package I can estimate the quantiles of Y given x. Done, I can not construct the conditional Y-CUMP density function. Could someone help me? Estimating the quantiles: libra...
asked by 08.10.2016 / 21:51