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:” plot13Click to enlarge

The code behind this plot is simple:

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 long-term reference and to expedite data visualization.

Bar Plot of Vector

plot3          Click to enlarge

Bar Plot of Matrix: #1

plot4          Click to enlarge

Bar Plot of Matrix: #2

plot5          Click to enlarge

Box Plot

plot6          Click to enlarge

Posted in R Graphics | Leave a comment

Trellis Graphs

UnderConstruction

Back | Next

Posted in R Graphics | Leave a comment

R Graphics: Multi-Graph 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.  Column-widths and the row-heights can be defined using additional input arguments.  layout.show() can then be used to see multi-graph 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 co-ordinate system.  No plotting is done inside a graphics device until at least one high level function has established the co-ordinate 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 high-level commands and the low level parameters that control full flexibility of R’s graphical environment.  Subchapters are organized as follows:

Structure and Devices
High-Level Commands
Example Plots
Graphics Parameters
Multi-graph Layouts
Trellis Charts

Back | Next

Posted in R Graphics | Leave a comment