Initialize a new plot window using preset parameters or add an axis to a plot.
thermo.plot.new(xlim, ylim, xlab, ylab, cex = par("cex"),
mar = NULL, lwd = par("lwd"), side = c(1,2,3,4),
mgp = c(1.7, 0.3, 0), cex.axis = par("cex"), col = par("col"),
yline = NULL, axs = "i", plot.box = TRUE, las = 1,
xline = NULL, grid = "", col.grid = "gray", ...)
thermo.axis(lab = NULL, side = 1:4, line = 1.5, cex = par("cex"),
lwd = par("lwd"), col = par("col"), grid = "", col.grid = "gray",
plot.line = FALSE)
numeric, limits of the \(x\)-axis
numeric, limits of the \(y\)-axis
character, \(x\)-axis label
character, \(y\)-axis label
numeric, character expansion factor for labels
numeric, width (number of lines) of margins on each side of plot
numeric, line width
numeric, which sides of plot to draw axes
numeric, sizes of margins of plot
numeric, character expansion factor for names of axes
character, color
numeric, margin line on which to plot \(y\)-axis name
character, setting for axis limit calculation
logical, draw a box around the plot?
numeric, style for axis labels
numeric, margin line on which to plot \(x\)-axis name
character, type of grid (major, minor, or both)
character, color of the grid lines
further arguments passed to par
character, axis label
numeric, margin line on which to place axis label
logical, draw axis lines?
thermo.plot.new sets parameters for a new plot, creates a new plot using plot.new, and adds the axes tick marks to the plot.
Plot parameters (see par) including cex, mar, lwd, mgp and axs can be given, as well as a numeric vector in side identifying which sides of the plot receive tick marks.
yline, if present, denotes the margin line (default par('mgp')[1]) where the y-axis name is plotted.
thermo.axis is the function that actually adds the axes, including inward-pointing major and minor tick marks (often used for thermodynamic property diagrams).
Use grid to add a grid to the plot, corresponding to either the major ticks (solid lines), minor ticks (dashed lines), or both.
The grid can be made by adding grid argument to diagram, or by calling thermo.axis after diagram (see example).
diagram uses thermo.plot.new to set up a new plot, unless the argument tplot is set to FALSE in diagram.
# Start a new plot with specific settings
thermo.plot.new(c(0, 10), c(0, 100), xlab = "X variable", ylab = "Y variable")
# Add major and minor tick marks to an existing plot
plot(1:10)
thermo.axis()
Run the code above in your browser using DataLab