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
In updating mosaicCalc I've written a function plot_f1() as a prototype for bringing ggformula graphics into the calculus vignette.
ggformula already contains gf_fun(), which is good for plotting a function of one variable. What's different about plot_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):
plot_f1(A * sin(2 * pi * t/P) ~ t | P,
t = c(0,100), P = 10*(1:3), A = 1:3, color = ~ A)
I've rewritten (and expanded) the examples given in the docs for gf_fun(). This indicates that plot_f1() could be used as a replacement for gf_fun(). To me it makes much more sense to add it to ggformula than to have an independent function in mosaicCalc.
You can see plot_f1() in action by installing mosaicCalc 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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: