2
$\begingroup$

I have a plot expression that looks something like this:

LogPlot[
 {f[x], g[x]}, {x, 0, 1000},
 Frame -> {True, True, False, False},
 FrameLabel -> {"x axis", "y axis"},
 FrameTicks -> {
   Automatic,
   Table[{10^i, Superscript["10", ToString[i]]}, {i, 2, 6}]}, 
 PlotLegends -> Placed[{"f(x)", "g(x)"}, {.2, .8}]
]

I want to increase the size of the axes labels without changing the size of the tick labels or the legends. The only advice I can find on this issue doesn't seem to work when using a Frame. Any ideas?

$\endgroup$
7
$\begingroup$

Example

Description

Use Style to format the text. I also didn't include the output of your LogPlot due to being unaware of your f[x] and g[x] definitions.

Code

Plot[
 Sin[x], {x, 0, 2 Pi},
 AxesLabel -> {Style["x", Bold, 16], Style["Sin(x)", Bold, 16]}
]

in your case

LogPlot[
 {f[x], g[x]},
 {x, 0, 1000},
 Frame -> {True, True, False, False},
 FrameLabel -> {Style["x axis", 16, Bold], Style["y axis", 16, Bold]},
 FrameTicks -> {Automatic, Table[{10^i, Superscript["10", ToString[i]]}, {i, 2, 6}]}, 
 PlotLegends -> Placed[{"f(x)", "g(x)"}, {.2, .8}]
 ]

Output

example

Reference

Style
AxesLabel

$\endgroup$
  • 1
    $\begingroup$ The following is really a question of style, so please feel free to ignore me if you disagree: however, I would find your answer more readable if it had less fragmentation, and if it stated the approach you took to solve the problem right at the beginning, rather than burying it in a note. Regarding fragmentation, I mean to say that having section headers for such a short answer seems overkill and it obfuscates your point. (but +1 for the workaround!) $\endgroup$ – MarcoB Jun 23 '16 at 15:05
  • $\begingroup$ @MarcoB thank you for your input on this matter. I try to maintain uniform look and feel to the answers I leave here on Mathematica.SE. I would most definitely take on your advise regarding moving the approach taken to solve the problem at the begining of the answer and leave notes for any additional information that I might have $\endgroup$ – e.doroskevic Jun 23 '16 at 15:11
  • $\begingroup$ Absolutely! As I said, this is really only a matter of my personal preference, so please feel free to disregard! Anyway, thanks for moving the explanation to the top: it enhances readability in my opinion. $\endgroup$ – MarcoB Jun 23 '16 at 15:16
  • $\begingroup$ I appreciate any input on the answers I leave; I find it beneficial and it allows me to imrpove the quality of my answers as I go. So I thank you for that! $\endgroup$ – e.doroskevic Jun 23 '16 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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