Open dtkaplan opened 6 years ago
This dropped off my radar and I haven't played with it yet.
A few questions:
gf_fun()
? Does it only add use cases, or does it change behavior?t
and P
?I'll have to look at it more carefully later, but if it only extends gf_fun()
, there is probably no downside to replacing gf_fun()
in ggformula
.
@dtkaplan, any more work on this? Should we try replacing gf_fun()
?
I haven't followed up on this. Since the mosaicCalc package isn't widely used, let's defer this issue until when I start working to update the documentation for mosaicCalc.
In updating
mosaicCalc
I've written a functionplot_f1()
as a prototype for bringingggformula
graphics into the calculus vignette.ggformula
already containsgf_fun()
, which is good for plotting a function of one variable. What's different aboutplot_f1()
is that it will plot functions of several variables. The formula that defines the function is used to specify which is the x-axis variable. The conditional part of the formula (if any) specifies the variables to be used for faceting. Additional arguments, e.g.color = ~ a
, can be used for variables that don't appear to the right of the tilde.An example (that's way too elaborate):
I've rewritten (and expanded) the examples given in the docs for
gf_fun()
. This indicates thatplot_f1()
could be used as a replacement forgf_fun()
. To me it makes much more sense to add it toggformula
than to have an independent function inmosaicCalc
.You can see
plot_f1()
in action by installingmosaicCalc
from GitHub.If this seems like a good line to persue, I'll extend it to handle functions of the form
sin(a * x) ~ x +a
in which case it will draw a contour plot of the LHS in the space defined by the RHS.