Update plotting function
Closed this issue · 5 comments
sbfnk commented
The matrix_plot
function uses fields::image.plot
which seems to have been deprecated so this should be updated.
Other considerations relating to this function:
- should we replace it with a
ggplot2
equivalent, reducing the number of dependencies and thus partially addressing #124? - should we make this a
plot
S3 function, which could potentially eventually live in https://github.com/socialcontactdata/contactmatrix where it could be used also for contact matrices generated by other packages?
Bisaloo commented
For me:
- Yes to using ggplot2, which offers users more customization options
- Yes to making it a
plot()
/autoplot()
function. My suggestion would be to put it directly in https://github.com/socialcontactdata/contactmatrix since it's one of the remaining items on the roadmap
lwillem commented
While ggplot2 has its advantages, I would recommend a less invasive change by switching to the updated function fields::imagePlot in this instance. This way, we remain within the base R plotting context. I can have a look at this next week. Reviewing the dependencies is certainly worthwhile, as well as the discussion about a generic plot() function.