0

In order to create an Hasse Diagram like the following

enter image description here

One is using the following libraries

library(rPref)
library(Rgraphviz)

One is taking a small sample of one's data

df <- data[1:10,]

Then creating the preferences

pref <- low(time) * low(MAPE)

And the Better-Than-Graph (BTG)

btg <- get_btg(df, pref)

In order to display the labels for the nodes containing relevant values, one is creating the labels as following

labels <- paste0(df$time, "\n", df$MAPE)

However, when one builds the visualization with

plot_btg(df, pref, labels)

One can only see the first label, instead of the two. Here is what one is seeing

enter image description here

Gonçalo Peres
  • 11,752
  • 3
  • 54
  • 83

1 Answers1

1

Passing use_dot=FALSE solved the problem

plot_btg(df, pref, labels, use_dot = FALSE)

enter image description here

Gonçalo Peres
  • 11,752
  • 3
  • 54
  • 83