-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatavis.R
More file actions
46 lines (35 loc) · 1.35 KB
/
Copy pathdatavis.R
File metadata and controls
46 lines (35 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
mydata <-read.csv("C:/Users/user.DESKTOP-AK91LQO/Desktop/Divyakanth/airquality.csv")
barplot(airquality$Ozone,
main= 'Ozone Concentration in air',
xlab = 'ozone levels', horiz = TRUE)
barplot(airquality$Ozone, main='Ozone Concentration in air',
xlab ='ozone levels', col='blue',horiz= TRUE)
hist(airquality$Temp, main ="La Guardia Airport's\ Maximum Temperature(Daily)",
xlab = "Temperature(Farnheit)",
xlim = c(50,125), col="yellow",
freq = TRUE)
boxplot(airquality$Wind, main = "Average wind speed\ at La Guardia Airport",
xlab = "Miles per hour", ylab = "wind",
col = "orange", border = "brown",
horizontal = TRUE, notch = TRUE)
boxplot(airquality[,0:4],
main = "Box Plots for Air Quality Parameters")
plot(airquality$Ozone, airquality$Month,
main = "Scatterplot Example",
xlab= "Ozone Concentration in parts of per billion",
ylab = "Month of observation", pch = 19)
set.seed(110)
data<-matrix(rnorm(50,0,5), nrow = 5, ncol = 5)
colnames(data)<- paste0("col",1:5)
rownames(data)<- paste0("row", 1:5)
heatmap(data)
cone <- function(x,y){
sqrt(x^2+y^2)
}
x<-y<-seq(-1,1,length=30)
z<-outer(x,y,cone)
persp(x,y,z,
main="Perspective of Plot of a Cone",
zlab="Height",
theta = 30, phi = 15,
col = "orange", shade = 0.4)