require(datasets)
# quakes data
#
# Create and save plot
out <- strucplot(lat ~ long|cut(mag,5)*cut(depth,4), data = quakes,
col="blue", main = "Earthquake locations, by magnitude and depth")
# Summary:
summary(out)
# Default output -- structure legend on console only
print(out)
# Add legends to the plot on either right or bottom (note partial matching)
print(out, legendLoc = "right")
print(out, legendLoc = "b")
#
# Abbreviate the conditioning factor names
print(out, legendLoc = "b", abbrev = 5)
#
# Plot the legend by itself on a separate page
print(out, legendLoc = "newp")
#
# Extra grid "gp" arguments to alter text appearance
print(out, legendLoc = "b",col="blue",fontface = "italic",
abbrev = 5)
Run the code above in your browser using DataLab