1
$\begingroup$

For example,

Plot[x^3, {x, -1, 1}]

gives ticks on both axes, and

Plot[x^3, {x, -1, 1},Frame->True]

gives ticks on the frame. Is it possible to have ticks on the axes with the framed plot?

Thank you for your help!

$\endgroup$
4
  • 2
    $\begingroup$ related or duplicate. In short, use Overlay . Try gr00=Plot[x^3, {x, -1, 1},ImagePadding->20]; gr01=Plot[x^3, {x, -1, 1},Frame->True,ImagePadding->20]; Overlay[{gr00,gr01}] $\endgroup$
    – andre314
    Apr 21, 2018 at 21:40
  • $\begingroup$ Thank you for your response even though duplicated, I saw the answer at your link, but it was more complicated and I'm under too much of a deadline to try to figure out what is what in that answer. Your minimal example worked perfectly with small modifications! I needed overlay=50, and changed the font color of the frame ticks to white to eliminate the numbering on the bottom frame. Thanks again! – Sureau 1 hour ago $\endgroup$
    – Sureau
    Apr 22, 2018 at 0:01
  • $\begingroup$ Does Framed[Plot[x^3, {x, -1, 1}]] do what you want? $\endgroup$
    – Bob Hanlon
    Apr 22, 2018 at 4:19
  • $\begingroup$ No, I like having the frame ticks. It allow you to line up a straight edge and approximate data points with complicated graphs. But thanks for your suggestion. $\endgroup$
    – Sureau
    Apr 22, 2018 at 4:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.