I have a graph use the base graphics package. For the labels on specific points I use
text(i, MSSAcar$summary[i,7]+.7, qld$LGA[i],
col='red', cex=.7, family='serif')
I have also used this in the plot for main titles and axis labels. They all come out as expected.
When I add a legend I cannot seem to be able to set the font family.
Can anyone help please.
Thanks.
Set the
family
plotting parameter before callinglegend()
to the value you want. Do this via an explicit call topar()
. Here is a simple exampleReally, you could change
family
before you do the first call toplot()
and leave out thefamily = "serif"
argument in the call totext()
. Setting viapar()
is global for the current device, using parameters within function calls is local to that call.The above code produces: