View source: R/ena.plot.points.R
ena.plot.points | R Documentation |
Plot all or a subset of the points of an ENAplot using the plotly plotting library
ena.plot.points( enaplot, points = NULL, point.size = enaplot$point$size, labels = NULL, label.offset = "top left", label.group = NULL, label.font.size = NULL, label.font.color = NULL, label.font.family = NULL, shape = "circle", colors = NULL, confidence.interval.values = NULL, confidence.interval = c("none", "crosshairs", "box"), outlier.interval.values = NULL, outlier.interval = c("none", "crosshairs", "box"), show.legend = T, legend.name = "Points", texts = NULL, ... )
enaplot |
|
points |
A dataframe of matrix where the first two column are X and Y coordinates |
point.size |
A data.frame or matrix where the first two column are X and Y coordinates of points to plot in a projected ENA space defined in ENAplot |
labels |
A character vector of point labels, length nrow(points); default: NULL |
label.offset |
character: top left (default), top center, top right, middle left, middle center, middle right, bottom left, bottom center, bottom right |
label.group |
A string used to group the labels in the legend. Items plotted with the same label.group will show/hide together when clicked within the legend. |
label.font.size |
An integer which determines the font size for point labels, default: enaplot$font.size |
label.font.color |
A character which determines the color of label font, default: enaplot$font.color |
label.font.family |
A character which determines label font type, choices: Arial, Courier New, Times New Roman, default: enaplot$font.family |
shape |
A character which determines the shape of point markers, choices: square, triangle, diamond, circle, default: circle |
colors |
A character vector of the point marker colors; if one given it is used for all, otherwise must be same length as points; default: black |
confidence.interval.values |
A matrix/dataframe where columns are CI x and y values for each point |
confidence.interval |
A character determining markings to use for confidence intervals, choices: none, box, crosshair, default: none |
outlier.interval.values |
A matrix/dataframe where columns are OI x and y values for each point |
outlier.interval |
A character determining markings to use for outlier interval, choices: none, box, crosshair, default: none |
show.legend |
Logical indicating whether to show the point labels in the in legend |
legend.name |
Character indicating the name to show above the plot legend |
texts |
[TBD] |
... |
additional parameters addressed in inner function |
ENAplot
The ENAplot provided to the function, with its plot updated to include the new points.
ena.plot
, ENAplot
, ena.plot.group
data(RS.data) codeNames = c('Data','Technical.Constraints','Performance.Parameters', 'Client.and.Consultant.Requests','Design.Reasoning','Collaboration'); accum = ena.accumulate.data( units = RS.data[,c("UserName","Condition")], conversation = RS.data[,c("Condition","GroupName")], metadata = RS.data[,c("CONFIDENCE.Change","CONFIDENCE.Pre","CONFIDENCE.Post")], codes = RS.data[,codeNames], window.size.back = 4 ) set = ena.make.set( enadata = accum, rotation.by = ena.rotate.by.mean, rotation.params = list( accum$meta.data$Condition=="FirstGame", accum$meta.data$Condition=="SecondGame" ) ) plot = ena.plot(set) group1.points = set$points[set$meta.data$Condition == "FirstGame",] group2.points = set$points[set$meta.data$Condition == "SecondGame",] plot = ena.plot.points(plot, points = group1.points); plot = ena.plot.points(plot, points = group2.points); print(plot);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.