Creates a bar plot showing multi-word expression frequencies with optional source-based coloring to distinguish between detected and manually added expressions.
Usage
plot_mwe_frequency(
mwe_data,
title = "Multi-Word Expression Frequency",
color_by_source = TRUE,
primary_color = "#10B981",
secondary_color = "#A855F7",
height = 500,
width = NULL
)Arguments
- mwe_data
Data frame containing MWE data with columns:
feature: The multi-word expression textfrequency: Frequency countrank: (optional) Rank of the expressiondocfreq: (optional) Document frequencysource: (optional) Source category (e.g., "Top 20", "Manual")
- title
Plot title (default: "Multi-Word Expression Frequency")
- color_by_source
Whether to color bars by source column (default: TRUE)
- primary_color
Color for primary/top expressions (default: "#10B981")
- secondary_color
Color for secondary/manual expressions (default: "#A855F7")
- 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_cluster_terms(),
plot_cross_category_heatmap(),
plot_entity_frequencies(),
plot_ngram_frequency(),
plot_pos_frequencies(),
plot_semantic_viz(),
plot_similarity_heatmap(),
plot_term_trends_continuous(),
plot_word_frequency()
