Open IgorDouven opened 6 years ago
see http://giovineitalia.github.io/Compose.jl/latest/#Text-1
plot(x=rand(1000), Geom.histogram, Guide.title("Histogram of <i>p</i>-values"))
will leave this open, as there is a bug for Guide.title("<i>p</i>-values")
Thanks! This gave the error:
ERROR: Could not parse pango markup.
I suppose that's due to the bug? (Or a problem with Cairo?)
As well as pango markup, Julia can generate symbols (including italic symbols, symbols with hats, super and subscript etc): https://docs.julialang.org/en/latest/manual/unicode-input/ There is an example here, where I mix the 2 forms: https://discourse.julialang.org/t/plotting-histogram-on-the-y-axis-at-the-end-of-a-time-series/5381/4
Thanks, very nice indeed. I noticed that Guide.title(" p = .2 ") works, but Guide.title("p = .2") throws an error. Perhaps it is obvious why to anyone with experience in HTML -- which I don't have.
@IgorDouven Does Guide.title("𝑝= .2")
work for you on Gadfly 1.3?
(It may have been fixed by GiovineItalia/Compose.jl#394?)
For the past years, I have been consistently using HTML syntax in Gadfly labels (so in this case, <i>p</>
etc.). That works very well for me. I'm not sure I can italicize text in the editor I'm using (VSCode). But next time I run a notebook in Jupyter lab, I'll check whether your solution works.
Suppose I have a title like: "Histogram of significant p-values", and I would like the p (and only the p) to be italicised. Maybe I'm overlooking something, but I cannot find any way to do that, or more generally to style just parts of a label (which can for instance easily be done in ggplot2). It would be nice to have this feature.