Skip to content

Commit

Permalink
the plot thickens
Browse files Browse the repository at this point in the history
  • Loading branch information
rosieluain committed Jun 14, 2023
1 parent 55aab31 commit 271df0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,20 @@ mortsplot<-function(data,type,ID,station,res.start="auto",res.end="auto",
}

if (interactive==TRUE){
# plot<-plot+ggplot2::aes(text=paste("ID:",.data[[ID]],
# "</br></br>Start:",ResStart,
# "</br>End:",ResEnd,
# "</br>Duration:",.data[[residences]],
# "</br>Station:",.data[[station]]))
# plot.int<-plotly::ggplotly(plot,tooltip="text")
plot.int<-ggplotly(plot)
if (is.null(residences)){
plot<-plot+ggplot2::aes(text=paste("ID:",.data[[ID]],"</br>",
"</br>Start:",ResStart,
"</br>End:",ResEnd,
"</br>Station:",.data[[station]]))
}
else {
plot<-plot+ggplot2::aes(text=paste("ID:",.data[[ID]],"</br>",
"</br>Start:",ResStart,
"</br>End:",ResEnd,
"</br>Duration:",.data[[residences]],
"</br>Station:",.data[[station]]))
}
plot.int<-plotly::ggplotly(plot,tooltip="text")
plot.int
}
else {
Expand Down
2 changes: 1 addition & 1 deletion man/resmax.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 271df0d

Please sign in to comment.