Creates a horizontal bar plot showing the top terms in a cluster or document group.
Usage
plot_cluster_terms(
terms,
cluster_id = NULL,
title = NULL,
n_terms = 10,
color = "#337ab7",
height = 500,
width = NULL
)Arguments
- terms
Named numeric vector of term frequencies, or data frame with 'term' and 'frequency' columns
- cluster_id
Cluster identifier for the title (default: NULL)
- title
Custom title (default: NULL, auto-generated from cluster_id)
- n_terms
Number of top terms to display (default: 10)
- color
Bar color (default: "#337ab7")
- height
Plot height in pixels (default: 500)
- width
Plot width in pixels (default: NULL for auto)
See also
Other visualization:
apply_standard_plotly_layout(),
create_empty_plot_message(),
create_message_table(),
create_standard_ggplot_theme(),
get_dt_options(),
get_plotly_hover_config(),
get_sentiment_color(),
get_sentiment_colors(),
plot_cross_category_heatmap(),
plot_entity_frequencies(),
plot_mwe_frequency(),
plot_ngram_frequency(),
plot_pos_frequencies(),
plot_semantic_viz(),
plot_similarity_heatmap(),
plot_term_trends_continuous(),
plot_word_frequency()
