directorycros.blogg.se

Describing scatter plots
Describing scatter plots









describing scatter plots

As the x variable increases, the y variable decreases, so there is a negative correlation. Draw a line that cuts through the middle of as many of the dots as possible. Your completed scatter graph should look like the below:ī) In order to work out what type of correlation there is, we need to draw in a line of best fit. (Since the temperature starts at 45\degree and goes up to 95\degree, you could start your temperature at 40\degree instead of 0\degree if you prefer.) On the y-axis, you can use can go up in increments of 10 or 20 degrees. As far as your scale is concerned, on the x-axis, it would make sense to go up in increments of one or two minutes. The two variables are obviously redundant (the elements would sum to 1 for each observation), but it makes the illustration of the method more transparent.A) Since time is the first row of the data table, time should be on the x-axis. The variable cirques_sf$Glaciated will contain 1’s for glaciated cirques, and 0 otherwise (i.e. unglaciated cirques), while the variable cirques_sf$Unglaciated will contain 1’s for unglaciated cirques, and 0 otherwise.

#Describing scatter plots code

In the code below, the two as.factor() functions are used to turn the single variable cirques_sf$Glacier, which has the values “ G” and “ U”, into two “binary” (0 or 1) variables. Cirque basins not currently occupied by glaciers were, of course, occupied in the past, while those occupied today indicate where “glacier-safe” climate prevails (at least for now). Whether a cirque is occupied by a glacier or not is basically determined by the trade-off between snow accumulation (and hence winter precipitation) and summer ablation (or melting, and hence summer temperature. The following example uses a data set of locations and elevations Oregon cirque basins (upland basins eroded by glaciers), and whether or not they are currently (early 21st century) glaciated. Ploting with ggplot2 will be the focus of an upcoming lecture. The ggplot2 package can produce lattice-like multipanel plots, by “faceting”, and for spatial data provides an alternative to spplot in the spatial ( sp) package. The next plot shows the variation of the relationship between January and July precipitation as it varies spatially.ħ Lattice-like plots of maps (using ggplot()) This relationship points to some orographic (i.e. related to the elevation of the mountains) amplification of the winter precipitation. At low elevations, there is proportionally lower January precipitation for the same July values (lower two panels on the lattice plot), but at higher elevations, there is proportionally more (top two panels). The plot shows that the relationship between January and July precipitation indeed varies with elevation.

describing scatter plots describing scatter plots

375, 1, 1), more=T) print( plot(Elevation), position= c(. Library(lattice) attach(scanvote) coplot(Yes ~ log10(Pop) | Country, columns= 3, panel= function(x,y.), xlab = "APJul", ylab = "APJan") print(plot2, position= c( 0. The map() function generates the outlines of a map of Oregon counties, and stores them in or.map, then the colors are figured out, and finally a 3-D scatter plot is made (using the scatterplot3d() function, and finally a 3-D scatter plot is made (using the scatterplot3d() function, and the points and droplines are added. Library(maps) # get points that define Oregon county outlines or_map <- map( "county", "oregon", xlim= c( - 125, - 114), ylim= c( 42, 47), plot= FALSE) # get colors for labeling the points plotvar <- orstationc $pann # pick a variable to plot nclr <- 8 # number of colors plotclr <- brewer.pal(nclr, "PuBu") # get the colors colornum <- cut( rank(plotvar), nclr, labels= FALSE) colcode <- plotclr # assign color # scatterplot and map plot.angle <- 135 s3d <- scatterplot3d(orstationc $lon, orstationc $lat, plotvar, type= "h", angle=plot.angle, color=colcode, pch= 20, cex.symbols= 2, col.axis= "gray", col.grid= "gray") s3d $ points3d(or_map $x,or_map $y, rep( 0, length(or_map $x)), type= "l") Exercise 05 - Data wrangling and matrix algebra.Exercise 03 - Bivariate plots and descriptive statistics.Analysis and visualization of large raster data sets.High-resolution and high-dimension data.Multivariate distances and cluster analysis.Principal components and factor analyses.











Describing scatter plots