quanteda / quanteda.textplots

Plotting and visualisation for quanteda
GNU General Public License v3.0
6 stars 1 forks source link

Scale defaults to relative when it should default to absolute #23

Open kbenoit opened 1 year ago

kbenoit commented 1 year ago
library("quanteda")
#> Package version: 3.3.0
#> Unicode version: 14.0
#> ICU version: 71.1
#> Parallel computing: 10 of 10 threads used.
#> See https://quanteda.io for tutorials and examples.
library("quanteda.textplots")

data_tokens_inaugural <- tokens(data_corpus_inaugural)
kw_god <- tokens_subset(data_tokens_inaugural, Year > 1970) |>
   kwic("god", window = 3)
kw_god_bless <- tokens_subset(data_tokens_inaugural, Year > 1970) |>
   kwic(phrase("god bless"), window = 3)

# should be default of absolute
textplot_xray(kw_god, kw_god_bless)

textplot_xray(kw_god_bless)

Created on 2023-05-24 with reprex v2.0.2