Skip to content

Commit

Permalink
Update Plots.jl's colorbar_titel maps to PGFPlotsX's `color bar sty…
Browse files Browse the repository at this point in the history
…le={ylabel}` (#3848)

* Update PGFPlotsX colorbar_titel map to ylabel

For most of the backends supported by Polts.jl the `colorbar_title` attribute maps to the attribute in the backend that ultimately is displayed on the vertical axis of the colorbar, which is vertically aligned. Not for PGFPlotsX as in this backend the `title` attribute is displayed on top of the colorbar while the `ylabel` is shown on the vertical bar.

* Update .zenodo.json

added my name to the contributors list
  • Loading branch information
jtschneider authored Sep 27, 2021
1 parent 405bc08 commit 09a6622
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,10 @@
{
"name": "Fred Callaway",
"type": "Other"
},
{
"name": "Jan Thorben Schneider",
"type": "Other"
}
],
"upload_type": "software"
Expand Down
2 changes: 1 addition & 1 deletion src/backends/pgfplotsx.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})

if hascolorbar(sp)
cticks = get_colorbar_ticks(sp)[2]
colorbar_style = PGFPlotsX.Options("title" => sp[:colorbar_title])
colorbar_style = PGFPlotsX.Options("ylabel" => sp[:colorbar_title])
if sp[:colorbar] === :top
push!(
colorbar_style,
Expand Down

0 comments on commit 09a6622

Please sign in to comment.