 Subscribe via RSS

Login
Archives
 October 2014 (1)
 December 2013 (1)
 October 2013 (2)
 September 2013 (2)
Tag Cloud
Animation (2) CSP (2) Data (8) Data Science (3) Distributions (1) Dust (5) Economics (6) Engineering (2) Equipment Venders (1) Faster R (1) GDAL (4) Germany (1) ggplot2 (2) GIS (4) Irradiance (3) Kuwait (1) LaTeX (1) Linux (1) Meteorology (5) Misc Tricks (1) Modeling (2) Natural Gas (2) Nuclear (1) O&M (2) Projects (4) Project Valuations (5) Qatar RE (12) R Colors (1) R Data Import (4) R Data Objects (16) R Data Syntax (6) Renewable Energy (8) RE Policy (3) Resource Assessment (6) R Graphics (5) R Packages (2) R Programming (6) Saudi Arabia (2) Scientific Computing (1) Solar (17) Spatial Analysis (4) UAE (2) Ubuntu (1) Website (1) Wind (3)Rbloggers
PV Insider
EIA – Today in Energy
Renewable Energy World
Category Archives: R Graphics
Solar Data Animation
A solar data animation is supplied to assess quality, spatial and time series dimensions:
 The quality dimension is a function of the availability of different sunlight components: Global Horizontal Irradiance (GHI), Direct Normal Irradiance (DNI), and Diffuse Horizontal Irradiance (DHI).
Posted in Animation, R Graphics, Solar, Spatial Analysis
Comments Off on Solar Data Animation
Correlation Plots in R
The standard function for correlation plots in R is pairs(), which generates a matrix of scatter plots based on all pairwise combinations of variables in a data object. The standard graph looks something like this after a little color enhancement:” Click to enlarge
The code behind this plot is simple:
1 2 3 4 
pairs(iris[1:4], main = "Anderson's Iris Data", pch = 21, bg = c("red", "green2", "steelblue4")[unclass(iris$Species)]) 
Posted in Data Science, ggplot2, R Graphics, R Programming
Comments Off on Correlation Plots in R
R Graphics Gallery
An R graphics gallery has been created with simple scripts for longterm reference and to expedite data visualization.
Bar Plot of Vector
1 2 3 4 5 6 7 8 
# Bar plot of vector set.seed(1) y.vec < sample(10:10,10, rep = TRUE) barplot(y.vec, col = "steelblue4", names = LETTERS[1:10], ylim=c(10,10)) abline(h = 0) 
Bar Plot of Matrix: #1
1 2 3 4 5 6 7 8 
# Bar plot of matrix: #1 set.seed(10) y.mat < matrix(sample(1:10, 60, rep = TRUE), nrow = 6) barplot(y.mat, col = colorRampPalette(c("steelblue4", "green"))(6), names=LETTERS[1:10], ylim=c(0, 50)) abline(h = 0) 
Bar Plot of Matrix: #2
1 2 3 4 5 6 7 8 
# Bar plot of matrix: #2 barplot(y.mat, col=colorRampPalette(c("steelblue4", "green"))(6), names=LETTERS[1:10], horiz = TRUE, legend = paste("Sensor", 1:6), xlim=c(0,50)) abline(v = 0) 
Box Plot
1 2 3 4 5 6 7 8 
# Box plot y < split(rnorm(1000), rpois(1000,2.2)) boxplot(y, col="orange", main="Boxplot", xlab="Poisson Distribution", ylab="Normal Distribution", ylim=c(3, 3)) 
Posted in R Graphics
Leave a comment
R Graphics: MultiGraph Layouts
The layout() Function
The ability to manage multiple plots in one graphical device or window is a key capability to enhance data visualization and analysis.
The layout() function in base R is the most straightforward method to divide a graphical device into rows and columns. The function requires an input matrix definition. Columnwidths and the rowheights can be defined using additional input arguments. layout.show() can then be used to see multigraph layouts and how the graphical device is being split.
Posted in R Graphics, R Programming
Leave a comment
R Graphics: Plot Parameters
High level plot commands open a graphics device. High level plot elements add objects. R plot parameters ensure actual control over the graphics device.
R Plot Parameters
All high level plotting functions have arguments which can be used to customize the plot. barplot(), for example, has arguments to control bar width, styles, etc. High level functions also take the optional “three dots” argument, which allows for argument sharing. The most common arguments shared are low level graph parameters from the par() function.
Posted in R Graphics
Leave a comment
R Graphics: High Level Commands
High level commands and plotting functions in R set up a coordinate system. No plotting is done inside a graphics device until at least one high level function has established the coordinate system. High level commands include plot type and plot elements. Together, they provide users with direct control of all graph objects and support the creation of highly customized data visualizations.
Posted in R Graphics
Leave a comment
R Graphics (base)
R graphics reference material is supplied on the highlevel commands and the low level parameters that control full flexibility of R’s graphical environment. Subchapters are organized as follows:
Structure and Devices
HighLevel Commands
Example Plots
Graphics Parameters
Multigraph Layouts
Trellis Charts
Posted in R Graphics
Leave a comment