You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a follow up to r-lib/waldo#56, which made more sense to ask here than in the waldo repo.
Currently vdiffr::expect_doppelganger() accepts a single ggplot object as input and compares to an SVG, but is there a way (or would you consider adding a way) to use vdiffr to test that two ggplot objects correspond to the same looking plot? I guess that would require either comparing them both to the same saved SVG or comparing separate SVG files created for each plot to each other.
Here's one example of a use case: in the bayesplot package we want to test that two different plotting functions create the same ggplot in the special case where the input matrix has 1 row:
# with exactly 1 row in `yrep` matrix these should produce the same plotplot1<- ppc_scatter_avg(y, yrep[1,, drop=FALSE])
plot2<- ppc_scatter(y, yrep[1,, drop=FALSE])
Is there a recommended way of using vdiffr to compare plot1 to plot2 or, if not, would you consider supporting this?
Thank you!
The text was updated successfully, but these errors were encountered:
I don't think this is in scope for vdiffr. The approach seems brittle because the graphics engine might take two plots that look exactly the same but draw them in different ways.
This is a follow up to r-lib/waldo#56, which made more sense to ask here than in the waldo repo.
Currently
vdiffr::expect_doppelganger()
accepts a single ggplot object as input and compares to an SVG, but is there a way (or would you consider adding a way) to use vdiffr to test that two ggplot objects correspond to the same looking plot? I guess that would require either comparing them both to the same saved SVG or comparing separate SVG files created for each plot to each other.Here's one example of a use case: in the bayesplot package we want to test that two different plotting functions create the same ggplot in the special case where the input matrix has 1 row:
Is there a recommended way of using vdiffr to compare
plot1
toplot2
or, if not, would you consider supporting this?Thank you!
The text was updated successfully, but these errors were encountered: