-
Notifications
You must be signed in to change notification settings - Fork 40
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
Variables in nested options #182
Comments
We did not expose that API yet, so currently a workaround would be some variant of using PGFPlotsX
Plot(PGFPlotsX.dictify(["mark" => "*", c]), PGFPlotsX.Coordinates(1:3,2:4)) I can see two solutions to this:
We should do (1) in any case IMO, (2) would be a nice sugar in addition. |
that wouldn't allow me to pass colors as a RGB type though, am I right? |
no, use |
I mean something like c = RGB(1.0,0.0,0.0)
PGFPlotsX.@pgf PGFPlotsX.Plot(
{
mark = "*",
"mark options" = "{ color = $c }",
},
PGFPlotsX.Coordinates(1:3,2:4)) ( I try to get the markers in a different color than the line ) |
You don't need a string, so you don't need to interpolate: using PGFPlotsX, Colors
c = RGB(1.0,0.0,0.0)
PGFPlotsX.@pgf PGFPlotsX.Plot(
{
mark = "*",
"mark options" = { color = c },
},
PGFPlotsX.Coordinates(1:3,2:4)) |
We could do like BenchmarkTools and implement interpolation in the macro. |
I see, that would be useful to construct things like using PGFPlotsX
opt = :mark
PGFPlotsX.@pgf { $opt = "*" } |
That would be nice. However, thinking about this, most of the standalone options one would want to interpolate are shortcuts, eg |
Addesses KristofferC#182, **NEEDS DOCS**.
The following does not use the escaped value of
c
:It reports
Is there an alternative way to do this?
The text was updated successfully, but these errors were encountered: