textCentralityPlot() plots words according to semantic similarity to the aggregated word embedding.
textCentralityPlot(
word_data,
min_freq_words_test = 1,
plot_n_word_extreme = 10,
plot_n_word_frequency = 10,
plot_n_words_middle = 10,
titles_color = "#61605e",
x_axes = "central_semantic_similarity",
title_top = "Semantic Centrality Plot",
x_axes_label = "Semantic Centrality",
scale_x_axes_lim = NULL,
scale_y_axes_lim = NULL,
word_font = NULL,
centrality_color_codes = c("#EAEAEA", "#85DB8E", "#398CF9", "#9e9d9d"),
word_size_range = c(3, 8),
position_jitter_hight = 0,
position_jitter_width = 0.03,
point_size = 0.5,
arrow_transparency = 0.1,
points_without_words_size = 0.5,
points_without_words_alpha = 0.5,
legend_title = "SC",
legend_x_axes_label = "x",
legend_x_position = 0.02,
legend_y_position = 0.02,
legend_h_size = 0.2,
legend_w_size = 0.2,
legend_title_size = 7,
legend_number_size = 2,
seed = 1007
)
Tibble from the textPlot function.
Select words to significance test that have occurred at least min_freq_words_test (default = 1).
Number of words per dimension to plot with extreme Supervised Dimension Projection value (default = 10). (i.e., even if not significant; duplicates are removed).
Number of words to plot according to their frequency (default = 10). (i.e., even if not significant).
Number of words to plot that are in the middle in Supervised Dimension Projection score (default = 10). (i.e., even if not significant; duplicates are removed).
Color for all the titles (default: "#61605e").
Variable to be plotted on the x-axes (default: "central_semantic_similarity", could also select "n", "n_percent").
Title (default: " ").
Label on the x-axes (default: "Semantic Centrality").
Length of the x-axes (default: NULL, which uses c(min(word_data$central_semantic_similarity)-0.05, max(word_data$central_semantic_similarity)+0.05); change this by e.g., try c(-5, 5)).
Length of the y-axes (default: NULL, which uses c(-1, 1); change e.g., by trying c(-5, 5)).
Type of font (default: NULL).
(HTML color codes. type = character) Colors of the words selected as plot_n_word_extreme (minimum values), plot_n_words_middle, plot_n_word_extreme (maximum values) and plot_n_word_frequency; the default is c("#EAEAEA", "#85DB8E", "#398CF9", "#9e9d9d", respectively.
Vector with minimum and maximum font size (default: c(3, 8)).
Jitter height (default: .0).
Jitter width (default: .03).
Size of the points indicating the words' position (default: 0.5).
Transparency of the lines between each word and point (default: 0.1).
Size of the points not linked to a word (default is to not show the point; , i.e., 0).
Transparency of the points that are not linked to a word (default is to not show it; i.e., 0).
Title of the color legend (default: "SCP").
Label on the color legend (default: "x").
Position on the x coordinates of the color legend (default = 0.02).
Position on the y coordinates of the color legend (default = 0.05).
Height of the color legend (default = 0.15).
Width of the color legend (default = 0.15).
Font size of the title (default = 7).
Font size of the values in the legend (default = 2).
Set different seed (default = 1007).
A 1-dimensional word plot based on similarity to the aggregated word embedding, as well as tibble with processed data used to plot.
See textCentrality
and textProjection
.
# Plot a centrality plot from the dataframe df_for_plotting
# that is returned by the textCentrality function.
if (FALSE) { # \dontrun{
textCentralityPlot(
df_for_plotting,
min_freq_words_test = 1,
plot_n_word_extreme = 10,
plot_n_word_frequency = 10,
plot_n_words_middle = 10,
titles_color = "#61605e",
x_axes = "central_semantic_similarity",
title_top = "Semantic Centrality Plot",
x_axes_label = "Semantic Centrality",
scale_x_axes_lim = NULL,
scale_y_axes_lim = NULL,
word_font = NULL,
centrality_color_codes = c("#EAEAEA", "#85DB8E", "#398CF9", "#9e9d9d"),
word_size_range = c(3, 8),
position_jitter_hight = 0,
position_jitter_width = 0.03,
point_size = 0.5,
arrow_transparency = 0.1,
points_without_words_size = 0.5,
points_without_words_alpha = 0.5,
legend_title = "SC",
legend_x_axes_label = "x",
legend_x_position = 0.02,
legend_y_position = 0.02,
legend_h_size = 0.2,
legend_w_size = 0.2,
legend_title_size = 7,
legend_number_size = 2,
seed = 1007
)
} # }