Fixing the colorbar title for colorbars on the top. (#4191)
* To fix #4183. * Providing my information according to #3503.
This commit is contained in:
parent
e06143ce33
commit
137d339e0b
@ -712,6 +712,10 @@
|
|||||||
{
|
{
|
||||||
"name": "Steve Leung",
|
"name": "Steve Leung",
|
||||||
"type": "Other"
|
"type": "Other"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Xu Zhi-Yuan",
|
||||||
|
"type": "Other"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"upload_type": "software"
|
"upload_type": "software"
|
||||||
|
|||||||
@ -206,8 +206,8 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
|
|
||||||
if hascolorbar(sp)
|
if hascolorbar(sp)
|
||||||
cticks = get_colorbar_ticks(sp)[2]
|
cticks = get_colorbar_ticks(sp)[2]
|
||||||
colorbar_style = PGFPlotsX.Options("ylabel" => sp[:colorbar_title])
|
|
||||||
if sp[:colorbar] === :top
|
if sp[:colorbar] === :top
|
||||||
|
colorbar_style = PGFPlotsX.Options("xlabel" => sp[:colorbar_title])
|
||||||
push!(
|
push!(
|
||||||
colorbar_style,
|
colorbar_style,
|
||||||
"at" => string((0.5, 1.05)),
|
"at" => string((0.5, 1.05)),
|
||||||
@ -217,6 +217,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
"xticklabel style" => pgfx_get_colorbar_ticklabel_style(sp),
|
"xticklabel style" => pgfx_get_colorbar_ticklabel_style(sp),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
colorbar_style = PGFPlotsX.Options("ylabel" => sp[:colorbar_title])
|
||||||
push!(
|
push!(
|
||||||
colorbar_style,
|
colorbar_style,
|
||||||
"ytick" => string("{", join(cticks, ","), "}"),
|
"ytick" => string("{", join(cticks, ","), "}"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user