Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider:

Manipulate[
 Plot[4 x^3 - x^5, {x, -2, 2},
  PlotRange -> {{-3, 3}, Automatic},
  AxesLabel -> {"x", "y"},
  Ticks -> {{{a, "x"}, {-a, "-x"}}, {{4 a^3 - a^5, 
      "f(x)"}, {-4 a^3 + a^5, "f(-x)"}}},
  PlotLabel -> 
   "Graph of f(x) = 4\!\(\*SuperscriptBox[\(x\), \(3\)]\)- \
\!\(\*SuperscriptBox[\(x\), \(5\)]\)",
  Epilog -> {
    Red, PointSize[Large],
    Point[{{a, 4 a^3 - a^5}, {0, 0}, {-a, -4 a^3 + a^5}}],
    Red, Dashed,
    Line[{{a, 4 a^3 - a^5}, {-a, -4 a^3 + a^5}}],
    Blue,
    Line[{{a, 0}, {a, 4 a^3 - a^5}, {0, 4 a^3 - a^5}}],
    Line[{{-a, 0}, {-a, -4 a^3 + a^5}, {0, -4 a^3 + a^5}}]
    }], {{a, 1}, -2, 2}]

Which produces this image.

enter image description here

Is it possible to place the tick marks -x and f(-x) on the other side of their axes?

Update: Some final adjustments due to tsuresuregusa. I really appreciate the help of my colleagues on Mathematica Stack Exchange.

Manipulate[
 Plot[4 x^3 - x^5, {x, -2, 2}, PlotRange -> {{-3, 3}, Automatic}, 
  AxesLabel -> {"x", "y"}, Ticks -> False, 
  PlotLabel -> 
   "Graph of f(x) = 4\!\(\*SuperscriptBox[\(x\), \(3\)]\)- \
\!\(\*SuperscriptBox[\(x\), \(5\)]\)",
  Epilog -> {
    Text["f(x)", {-.2 Sign[a], 4 a^3 - a^5}], 
    Text["x", {a, -.3 Sign[a]}], 
    Text["f(-x)", {.3 Sign[a], -4 a^3 + a^5}], 
    Text["-x", {-a, .4 Sign[a]}], Red, PointSize[Large], 
    Point[{{a, 4 a^3 - a^5}, {0, 0}, {-a, -4 a^3 + a^5}}], Red, 
    Dashed, Line[{{a, 4 a^3 - a^5}, {-a, -4 a^3 + a^5}}], Blue, 
    Line[{{a, 0}, {a, 4 a^3 - a^5}, {0, 4 a^3 - a^5}}], 
    Line[{{-a, 0}, {-a, -4 a^3 + a^5}, {0, -4 a^3 + a^5}}]}], {{a, 1},
   0.6, 2}]
share|improve this question
1  
what about epilog them by hand? Text["f(-x)", {-.2 Sign[a], 4 a^3 - a^5}] and so on – tsuresuregusa Jan 31 at 2:12
    
Related, perhaps even duplicate: (6395), (64898) – Mr.Wizard Jan 31 at 3:33
up vote 6 down vote accepted

I meant this in my comment

Manipulate[
 Plot[4 x^3 - x^5, {x, -2, 2}, PlotRange -> {{-3, 3}, Automatic}, 
  AxesLabel -> {"x", "y"}, Ticks -> False, 
  PlotLabel -> 
   "Graph of f(x) = 4\!\(\*SuperscriptBox[\(x\), \(3\)]\)- \
\!\(\*SuperscriptBox[\(x\), \(5\)]\)", 
  Epilog -> {Text["f(-x)", {-.2 Sign[a], 4 a^3 - a^5}], 
    Text["-x", {a, -.3 Sign[a]}], 
    Text["f(x)", {.2 Sign[a], -4 a^3 + a^5}], 
    Text["x", {-a, .3 Sign[a]}], Red, PointSize[Large], 
    Point[{{a, 4 a^3 - a^5}, {0, 0}, {-a, -4 a^3 + a^5}}], Red, 
    Dashed, Line[{{a, 4 a^3 - a^5}, {-a, -4 a^3 + a^5}}], Blue, 
    Line[{{a, 0}, {a, 4 a^3 - a^5}, {0, 4 a^3 - a^5}}], 
    Line[{{-a, 0}, {-a, -4 a^3 + a^5}, {0, -4 a^3 + a^5}}]}], {{a, 
   1}, -2, 2}]

enter image description here

share|improve this answer
    
Thanks so much. Very helpful. – David Jan 31 at 4:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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