Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef36c6bd0a | ||
|
|
a64d84ae70 | ||
|
|
9c1b30f774 | ||
|
|
ebfe97a692 | ||
|
|
d8c4210e8f | ||
|
|
a9c0073aff | ||
|
|
d04bb42f7b | ||
|
|
bf849d90a7 | ||
|
|
95157004b6 |
+1
-1
@@ -1,7 +1,7 @@
|
||||
name = "Plots"
|
||||
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||
author = ["Tom Breloff (@tbreloff)"]
|
||||
version = "1.0.9"
|
||||
version = "1.0.10"
|
||||
|
||||
[deps]
|
||||
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
||||
|
||||
+1
-1
@@ -283,7 +283,7 @@ function get_minor_ticks(sp, axis, ticks)
|
||||
minorticks = typeof(ticks[1])[]
|
||||
for (i,hi) in enumerate(ticks[2:end])
|
||||
lo = ticks[i]
|
||||
if isfinite(lo) && hi > lo
|
||||
if isfinite(lo) && isfinite(hi) && hi > lo
|
||||
append!(minorticks,collect(lo + (hi-lo)/n :(hi-lo)/n: hi - (hi-lo)/2n))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -240,6 +240,16 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||
PGFPlotsX.Axis
|
||||
end
|
||||
axis = axisf(axis_opt)
|
||||
if sp[:legendtitle] !== nothing
|
||||
push!(axis, PGFPlotsX.Options("\\addlegendimage{empty legend}" => nothing))
|
||||
push!(
|
||||
axis,
|
||||
PGFPlotsX.LegendEntry(
|
||||
string("\\hspace{-.6cm}{\\textbf{", sp[:legendtitle], "}}"),
|
||||
false,
|
||||
),
|
||||
)
|
||||
end
|
||||
for (series_index, series) in enumerate(series_list(sp))
|
||||
# give each series a uuid for fillbetween
|
||||
series_id = uuid4()
|
||||
|
||||
+12
-3
@@ -536,13 +536,16 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
msc = py_markerstrokecolor(series)
|
||||
lw = py_thickness_scale(plt, series[:markerstrokewidth])
|
||||
for i=eachindex(y)
|
||||
extrakw[:c] = _cycle(markercolor, i)
|
||||
if series[:marker_z] !== nothing
|
||||
extrakw[:c] = [py_color(get_markercolor(series, i))]
|
||||
end
|
||||
|
||||
push!(handle, ax."scatter"(_cycle(x,i), _cycle(y,i);
|
||||
label = series[:label],
|
||||
zorder = series[:series_plotindex] + 0.5,
|
||||
marker = py_marker(_cycle(shapes,i)),
|
||||
s = py_thickness_scale(plt, _cycle(series[:markersize],i) .^ 2),
|
||||
facecolors = get_markercolor(series, i),
|
||||
edgecolors = msc,
|
||||
linewidths = lw,
|
||||
extrakw...
|
||||
@@ -1110,7 +1113,13 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
||||
end
|
||||
pyaxis."label"."set_fontsize"(py_thickness_scale(plt, axis[:guidefontsize]))
|
||||
pyaxis."label"."set_family"(axis[:guidefontfamily])
|
||||
pyaxis."label"."set_rotation"(axis[:guidefontrotation])
|
||||
|
||||
if (letter == :y && !RecipesPipeline.is3d(sp))
|
||||
pyaxis."label"."set_rotation"(axis[:guidefontrotation] + 90)
|
||||
else
|
||||
pyaxis."label"."set_rotation"(axis[:guidefontrotation])
|
||||
end
|
||||
|
||||
for lab in getproperty(ax, Symbol("get_", letter, "ticklabels"))()
|
||||
lab."set_fontsize"(py_thickness_scale(plt, axis[:tickfontsize]))
|
||||
lab."set_family"(axis[:tickfontfamily])
|
||||
@@ -1311,7 +1320,7 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
|
||||
color = py_color(single_color(get_linecolor(series, clims)), get_linealpha(series)),
|
||||
linewidth = py_thickness_scale(plt, clamp(get_linewidth(series), 0, 5)),
|
||||
linestyle = py_linestyle(:path, get_linestyle(series)),
|
||||
marker = py_marker(first(series[:markershape])),
|
||||
marker = py_marker(_cycle(series[:markershape], 1)),
|
||||
markeredgecolor = py_color(single_color(get_markerstrokecolor(series)), get_markerstrokealpha(series)),
|
||||
markerfacecolor = py_color(single_color(get_markercolor(series, clims)), get_markeralpha(series))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user