Skip to content
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

Legend title getting cut off #1417

Closed
tomyun opened this issue Apr 14, 2020 · 1 comment
Closed

Legend title getting cut off #1417

tomyun opened this issue Apr 14, 2020 · 1 comment

Comments

@tomyun
Copy link

tomyun commented Apr 14, 2020

using Gadfly
import Cairo, Fontconfig

using DataFrames
df = DataFrame(x=[1,2], y=[1,2], c=[1,2])

plot(df, x=:x, y=:y, color=:c, Guide.colorkey(title="CO2 (μmol mol⁻¹)"))

would result into a color key title getting cut off at the end with a warning message from pango.

before

(process:51946): Pango-WARNING **: 20:37:22.372: pango_layout_set_markup_with_accel: Error on line 1 char 25: Invalid UTF-8 encoded text in name — not valid “CO2 (μmol mol\xe2\x81”

This warning could potentially show up whenever using Unicode symbols in a text label under Pango layout and get its label width smaller than expected, but the glitch seemed only visible in a narrow layout used in such as color key title. A related issue I found was #1410.

I posted a PR for this issue in Compose.jl: GiovineItalia/Compose.jl#393
Here is the same plot after fix applied. No more pango warning.

after

@bjarthur
Copy link
Member

GiovineItalia/Compose.jl#393 has been merged.

tomyun added a commit to cropbox/Cropbox.jl that referenced this issue Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants