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
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 1K views
Swamp Thing
Insights Author
Messages
1,062
Reaction score
819
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