Use a rule variable for AxesStyle->20

  • Context: Mathematica 
  • Thread starter Thread starter Swamp Thing
  • Start date Start date
  • Tags Tags
    Variable
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 1K views
Swamp Thing
Insights Author
Messages
1,065
Reaction score
821
TL;DR
Why doesn't this work:
axs = AxesStyle -> 20;
Plot [ Sin[x], {x,0,10}, axs ]
How to use a variable rule, e.g. axs = AxesStyle->20 , to set the AxesStyle ? The code in the summary gives this error:

"Options expected (instead of axs) beyond position 2 in Plot[x x,{x,0,10}, axs]. An option must be a rule or a list of rules."

Isn't that "axs" a legit rule?
 
Last edited:
Physics news on Phys.org
Plot has the attribute HoldAll so axs is left unevaluated. You need to use Evaluate[axs] to force evaluation despite the HoldAll
 
Reply
  • Informative
Likes   Reactions: Swamp Thing