##Horizontal Bar Plot for 
##Ozone concentration in air
barplot(airquality$Ozone,
        main = 'Ozone Concenteration in air',
        xlab = 'ozone levels', horiz = TRUE)
# Vertical Bar Plot for 
# Ozone concentration in air
barplot(airquality$Ozone, main = 'Ozone Concenteration in air', 
        xlab = 'ozone levels', col ='blue', horiz = FALSE)
# Histogram for Maximum Daily Temperature
data(airquality)
hist(airquality$Temp, main ="La Guardia Airport's\
Maximum Temperature(Daily)",
    xlab ="Temperature(Fahrenheit)",
    xlim = c(50, 125), col ="yellow",
    freq = TRUE)
# Box plot for average wind speed
data(airquality)
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)
#Multiple Box plots, each representing
# an Air Quality Parameter
boxplot(airquality[, 0:4], 
        main ='Box Plots for Air Quality Parameters')
#Scatter plot for Ozone Concentration per month
data(airquality)
plot(airquality$Ozone, airquality$Month,
     main ="Scatterplot Example",
    xlab ="Ozone Concentration in parts per billion",
    ylab =" Month of observation ", pch = 19)
#Set seed for reproducibility
# set.seed(110)
# Create example data
data <- matrix(rnorm(50, 0, 5), nrow = 5, ncol = 5)
# Column names
colnames(data) <- paste0("col", 1:5)
rownames(data) <- paste0("row", 1:5)
# Draw a heatmap
heatmap(data)

# Adding Titles and Labeling Axes to Plot
cone <- function(x, y){
sqrt(x ^ 2 + y ^ 2)
}
# prepare variables.
x <- y <- seq(-1, 1, length = 30)
z <- outer(x, y, cone)
# plot the 3D surface
# Adding Titles and Labeling Axes to Plot
persp(x, y, z,
main="Perspective Plot of a Cone",
zlab = "Height",
theta = 30, phi = 15,
col = "orange", shade = 0.4)

# Create the data for the chart.
v <- c(17, 25, 38, 13, 41)
# Plot the bar chart.
plot(v, type = "o")

# Create the data for the chart.
v <- c(17, 25, 38, 13, 41)
# Plot the bar chart.
plot(v, type = "o", col = "green",
    xlab = "Month", ylab = "Article Written",
    main = "Article Written chart")
    
# Create the data for the chart.
v <- c(17, 25, 38, 13, 41)
t <- c(22, 19, 36, 19, 23)
m <- c(25, 14, 16, 34, 29)
# Plot the bar chart.
plot(v, type = "o", col = "red",
    xlab = "Month", ylab = "Article Written ",
    main = "Article Written chart")
lines(t, type = "o", col = "blue")
lines(m, type = "o", col = "green")

#Create the data for the chart
A <- c(17, 32, 8, 53, 1)
# Plot the bar chart 
barplot(A, xlab = "X-axis", ylab = "Y-axis", main ="Bar-Chart")













Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: