Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manipulate Labels in Gadfly Charting Julia

Tags:

julia

I have a line chart in Gadfly using the label = "string vector" option. My question is how can I manipulate the location and size of the labels printed on the chart? I want to adjust the location of the printed labels upward slightly and increase the font size. How can I do this?

From the Gadfly documentation, I think it should be an option within 'Theme', but I can't seem to figure this out.

http://gadflyjl.org/themes.html

Thank you

like image 395
Jeremy McNees Avatar asked Nov 09 '22 23:11

Jeremy McNees


1 Answers

As mentioned by @jfish003 there is a named argument in Theme, major_label_font_size which can be set as needed. The font size of minor label can also be set. Note that the argument is of type Measure, a simple example,

julia>plot(x=rand(10), y=rand(10), Theme(major_label_font_size=15pt))

enter image description here

like image 142
Abhijith Avatar answered Dec 24 '22 01:12

Abhijith