pgf fixes
This commit is contained in:
parent
e3ccc34a2c
commit
ec06a01b6c
@ -94,20 +94,18 @@ const _pgf_series_extrastyle = KW(
|
|||||||
# --------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# takes in color,alpha, and returns color and alpha appropriate for pgf style
|
# takes in color,alpha, and returns color and alpha appropriate for pgf style
|
||||||
function pgf_color(c, a = nothing)
|
function pgf_color(c)
|
||||||
c = getColor(c)
|
|
||||||
cstr = @sprintf("{rgb,1:red,%.8f;green,%.8f;blue,%.8f}", red(c), green(c), blue(c))
|
cstr = @sprintf("{rgb,1:red,%.8f;green,%.8f;blue,%.8f}", red(c), green(c), blue(c))
|
||||||
a = float(a == nothing ? alpha(c) : a)
|
cstr, alpha(c)
|
||||||
cstr, a
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function pgf_fillstyle(d::KW)
|
function pgf_fillstyle(d::KW)
|
||||||
cstr,a = pgf_color(d[:fillcolor], d[:fillalpha])
|
cstr,a = pgf_color(d[:fillcolor])
|
||||||
"fill = $cstr, fill opacity=$a"
|
"fill = $cstr, fill opacity=$a"
|
||||||
end
|
end
|
||||||
|
|
||||||
function pgf_linestyle(d::KW)
|
function pgf_linestyle(d::KW)
|
||||||
cstr,a = pgf_color(d[:linecolor], d[:linealpha])
|
cstr,a = pgf_color(d[:linecolor])
|
||||||
"""
|
"""
|
||||||
color = $cstr,
|
color = $cstr,
|
||||||
draw opacity=$a,
|
draw opacity=$a,
|
||||||
@ -117,8 +115,8 @@ end
|
|||||||
|
|
||||||
function pgf_marker(d::KW)
|
function pgf_marker(d::KW)
|
||||||
shape = d[:markershape]
|
shape = d[:markershape]
|
||||||
cstr, a = pgf_color(d[:markercolor], d[:markeralpha])
|
cstr, a = pgf_color(d[:markercolor])
|
||||||
cstr_stroke, a_stroke = pgf_color(d[:markerstrokecolor], d[:markerstrokealpha])
|
cstr_stroke, a_stroke = pgf_color(d[:markerstrokecolor])
|
||||||
"""
|
"""
|
||||||
mark = $(get(_pgfplots_markers, shape, "*")),
|
mark = $(get(_pgfplots_markers, shape, "*")),
|
||||||
mark size = $(0.5 * d[:markersize]),
|
mark size = $(0.5 * d[:markersize]),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user