I am comparing different clustering methods and I would like to see if two different methods (or sets of parameters) are defining similar clusters or not. My clusters are defined as categorical factors (categorical variables) in a data frame.
If I use plot() with x being a categorical variable and y being a continuous variable I get a box plot. If I do the same but y being another categorical variable I get some weird bar plot (figure below). How do you interpret this king of plot?

In this plot,x (df$category1) has 13 levels:
[1] "A" "B" "C" "D" "cluster1" "cluster5"
[7] "cluster2" "cluster8" "cluster0" "cluster6" "cluster4" "cluster3"
[13] "cluster7"
and y (df$category2) has only 12 levels :
[1] "A" "B" "C" "D" "cluster5" "cluster0"
[7] "cluster4" "cluster2" "cluster3" "cluster6" "cluster1" "cluster7"
A, B, C, and D are the same between the two columns, the rest if clusters are not necessarily the same as are the result of different clustering runs.
Edit : the code used was plot(df$category1, df$category2)
When
xandyare both factors,plotcallsspineplot. Example from that function’s help page:Though this looks a little different to the plot you have.