Displaying 4 results from an estimated 4 matches for "emission_from_land".
2017 Nov 20
3
Σχετ: change colour in barplot
...? ? ? ? ?? G ? ? ? ? ? ? ? ?0.0.24 ? ? ? ?? 152460 ? ? ? ? 474 ? ? ? 5.5 ? ? ?? 612000 ? ? ? ? ? 59061000 ? ? ? 1540313
> and here is the script:
> setwd("~/Desktop")
> emission<-read.csv("emission from land.csv")
> attach(emission)
> #define the formulas
> Emission_from_Land<-A*B*C*DEmission_from_Access_Road<-E*(F/1000000)*CEmissions_from_well<-(G/1000000)*E*C
> #combine my outputs into a new dataframe
> dat<-cbind(Emission_from_Land, Emission_from_Access_Road, Emissions_from_well_pad)
> #plot a barplot
> barplot(dat, ylab="Kg-CO2 Eq",...
2017 Nov 20
2
change colour in barplot
...E ? ? ? ? ? ? ? ? ?? F ? ? ? ? ? ? ? ? ?? G ? ? ? ? ? ? ? ?0.0.24 ? ? ? ?? 152460 ? ? ? ? 474 ? ? ? 5.5 ? ? ?? 612000 ? ? ? ? ? 59061000 ? ? ? 1540313
and here is the script:
setwd("~/Desktop")
emission<-read.csv("emission from land.csv")
attach(emission)
#define the formulas
Emission_from_Land<-A*B*C*DEmission_from_Access_Road<-E*(F/1000000)*CEmissions_from_well<-(G/1000000)*E*C
#combine my outputs into a new dataframe
dat<-cbind(Emission_from_Land, Emission_from_Access_Road, Emissions_from_well_pad)
#plot a barplot
barplot(dat, ylab="Kg-CO2 Eq", ylim=c(0.0e+00, 2e+...
2017 Nov 20
0
Σχετ: change colour in barplot
.... I have attached the script and a .csv file
> with an example.
The problem is that you have dat as a matrix with only one row.
barplot() applies the colours to the rows of dat; since you have only
one row, everything ends up blue.
You can fix this by creating dat as a vector using
dat<-c(Emission_from_Land, Emission_from_Access_Road,
Emissions_from_well_pad)
or by using "beside = TRUE" in the arguments to barplot. These will
give similar but slightly different results; I don't know which one is
better for you, but I like the vector solution better.
Duncan Murdoch
>...
2017 Nov 20
0
change colour in barplot
...? ? ? ? ?? G ? ? ? ? ? ? ? ?0.0.24 ? ? ? ?? 152460 ? ? ? ? 474 ? ? ? 5.5 ? ? ?? 612000 ? ? ? ? ? 59061000 ? ? ? 1540313
> and here is the script:
> setwd("~/Desktop")
> emission<-read.csv("emission from land.csv")
> attach(emission)
> #define the formulas
> Emission_from_Land<-A*B*C*DEmission_from_Access_Road<-E*(F/1000000)*CEmissions_from_well<-(G/1000000)*E*C
> #combine my outputs into a new dataframe
> dat<-cbind(Emission_from_Land, Emission_from_Access_Road, Emissions_from_well_pad)
> #plot a barplot
> barplot(dat, ylab="Kg-CO2 Eq",...