epiforecasts / socialmixr

R package for deriving social mixing matrices from survey data.
http://epiforecasts.io/socialmixr/
Other
38 stars 10 forks source link

Update plotting function #129

Closed sbfnk closed 1 month ago

sbfnk commented 2 months ago

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:

pinging @Bisaloo @lwillem for thoughts/views.

Bisaloo commented 2 months ago

For me:

lwillem commented 1 month ago

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.

sbfnk commented 1 month ago

Sounds like the short-term fix is @lwillem's suggestion, whereas in the slightly longer term we want to farm this out to the contactmatrix package (which will be imported by socialmixr).

lwillem commented 1 month ago

I updated the plot_matrix function as discussed. See #133 for more information.

sbfnk commented 1 month ago

Fixed in #133.