我试图使用 ggplotly 函数来交互地使用 buraR 包中的trace_explorer 函数创建一个绘图,但生成的绘图不是预期的。
\n这是代码:
\nlibrary(ggplot2)\nlibrary(bupaR)\n\npatients <- eventdataR::patients # dataset from bupaR\n\ndf <- eventlog(patients,\n case_id = "patient",\n activity_id = "handling",\n activity_instance_id = "handling_id",\n lifecycle_id = "registration_type",\n timestamp = "time",\n resource_id = "employee")\n\n\n\n\ntr <- df %>% processmapR::trace_explorer(type = "frequent", coverage = 1.0)\n\n# tr # print the ggplot to see the expected output!\nggplotly(tr)\nRun Code Online (Sandbox Code Playgroud)\n和结果图
\n\n我尝试使用 ggplot2 中的主题选项,然后使用布局函数,但结果仍然相同,没有图例。
\nggtrace <- trace_explorer(df,\n type = "frequent", \n coverage = 1.0)\n\nggtrace <- ggtrace + \n theme (legend.position="none") +\n …Run Code Online (Sandbox Code Playgroud)