-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plotEqn() - can't supply labels for lines #68
Comments
I took a look at this a couple of days ago and have thought about it a bit since. I think that the |
Just to be clear: the figure I'm trying to create is the left panel of that below, illustrating the duality between lines in data space I did this from scratch, starting from
then adding annotations of the simplified Not a big hurry to fix the |
Yes, the two problems were clear to me: (1) You can't get user-supplied labels with |
Here's a first attempt at simplifying 2-variable equations, which could be used in
For example,
I don't see how you can make something like this work with |
This looks nice, and would help certainly in It would also help for my use case, but I think I see where the
This assumes that the variables have been mapped from
Unless @philchalmers objects, I suggest to add your In this case, the function could just treat them as given; it would be up to the user to decide whether to use expressions in them. Does that sound workable? |
I don't have an objection to improving the
which looks fine (though I'd prefer if Eqn() were called within showEqn() when latex=TRUE to avoid the pipe), but then the
Obviously this needs to be fixed too, though given the new focus on TeX instead of ASCII outputs should showEqn() be modified to be TeX driven instead? The ASCII and TeX approaches are not particularly complimentary.... just trying to get ahead of future issues. |
Maybe I'm missing something, but isn't the fundamental problem that although character strings can occur within an expression, character strings aren't expressions? Try, e.g.,
It is possible to render LaTeX in plots. |
I agree with @philchalmers that The issue is being able to use equations as line labels in |
To elaborate my previous examples slightly, compare
|
In
dev/plotEqn-test.R
, I've tried to supply my own labels for lines, b/c I want to usex
andy
for the variables and simplify the equations to the formy = a + b * x
. I have a test version indev/plotEqn.R
, where I'd like to also add options to control the solution points, allowing the argumentsolution = list(pch =, cex=, col=)
(This is for an example where I'd like to show the duality of points and lines in data / beta space.)
The lines appear, but not the labels
I can't see what is wrong with the relevant code in the function (around line 132)
Related to this is the fact that the
simplify
argument doesn't simplify as much as I'd like:It would be nicer if this gave (aligned)
The text was updated successfully, but these errors were encountered: