I come to julia from R. In R, my habit is to thin out the margins quite a lot, and snuggle the axis labels in very close to the data area. I know I can alter the margin span, but is there a way I can do this “snuggling” within that area, so I can dedicate as much space as possible to the actual data? (I realize that the defaults are useful for publication, but for earlier analysis stages, I don’t care about aesthetics and just want to see as much of the data detail as I can.)
The answer is probably yes, but which plotting package are you using?
As a newbie, I’m not too sure how to answer that. I say using Plots
in my script. If I run it interactively, the plot has “GKS QtTerm” in the title bar, if that’s a clue. I’ve also read that the default is GR, so maybe that’s what I’m using.
As a newbie, I am not really sure how to find what plotting package is being used. I’m sorry to be so ignorant.
PS. I am less concerned with interactive views, than PDF and PNG view created with savefig()
.
And that’s the answer right there
Appreciate that this might be confusing for new users, although it’s pretty much the same in R isn’t it? You say library(ggplot2)
or library(plotly)
or whatever to call your favourite plotting library.
I’ve added the plots
category to your post to hopefully attract a few more experienced Plots
users, although my gut feel is that this is one of those fine-tuning features that Plots
, by virtue of being an abstraction over different plotting backends, might struggle with…
If I understand you correctly your issue is that you want to have axis labels closer to the axis itself, which based on a very old GitHub issue doesn’t seem to be possible:
(read all the way to the end, which I think is your point)
Thanks for the tips, Nils, and also for setting the category. Dan.
No problem - I should also mention that while Plots
sounds official and is indeed one of the most popular plotting libraries in Julia, it’s by no means the only option.
Makie
often offers much more fine grained control over plots layouts, so worth looking into, and if you come from a grammar-of-graphics background in R take a look at AlgebraOfGraphics
which implements this style on top of Makie
.
You can increase your plot real estate by decreasing the labelling font sizes and rotating them along the y-axis. Try the keyword arguments:
tickfontsize=6, labelfontsize=6, yrotation=90