2
$\begingroup$

I have a plot with labels positioned using the epilog function for convenience. I would like to increase the size of axes labels within the epilog function but I haven't managed to figure out a way to do so. I've read through a number of posts (post_1, post_2) but they all don't seem to address this problem. My codes are given below:

Plot[x^2 + 4 x, {x, -7, 6}, ImageSize -> 600,  
AxesStyle -> Arrowheads[{0, 0.03}], 
Epilog -> { Inset["x axis", Scaled[{0.5, 0.15}]], 
Inset["y axis", Scaled[{0.5, 0.95}]]}, 
PlotStyle -> {Thickness[0.007]}, 
LabelStyle -> Directive[Bold, Black, Medium]]

Any assistance would be appreciated.

$\endgroup$

closed as off-topic by MarcoB, Karsten 7., m_goldberg, Bob Hanlon, dr.blochwave Jul 8 '15 at 13:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, Karsten 7., m_goldberg, Bob Hanlon, dr.blochwave
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    $\begingroup$ Use Style on the argument of Inset to impose a style on the text labels: e.g. Style["x axis", FontSize -> 25] $\endgroup$ – MarcoB Jul 7 '15 at 16:04
  • $\begingroup$ Thanks so much. Took a while to figure that one out. I'll post the solution below my question. $\endgroup$ – John_dydx Jul 7 '15 at 16:12
  • 2
    $\begingroup$ John, glad to help. Answering your own question is highly encouraged here on stackexchange. Rather than adding the answer directly to the question, would you please post the solution as your own answer? That will make the question show up as answered to other people with a similar problem. $\endgroup$ – MarcoB Jul 7 '15 at 16:23
  • $\begingroup$ Great, I'll do that. $\endgroup$ – John_dydx Jul 7 '15 at 16:41
3
$\begingroup$

Edit: Thanks to MarcoB, here's the solution (this increases the size of the x axis label):

Plot[x^2 + 4 x, {x, -7, 6}, ImageSize -> 600,  
AxesStyle -> Arrowheads[{0, 0.03}], 
Epilog -> { 
Inset[Style["x axis", FontSize -> 25], Scaled[{0.5, 0.15}]], 
Inset["y axis", Scaled[{0.5, 0.95}]]}, 
PlotStyle -> {Thickness[0.007]}, 
LabelStyle -> Directive[Bold, Black, Medium]]
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.