0
$\begingroup$

Usually on a plot the vertical scale is on the left, and the horizontal scale is on the bottom. How to make the vertical scale appear on both left and right, and similarly the horizontal scale on both top and bottom? This just makes my life easier when after exporting the file I can still see the scale even if I zoom-in the right or top region of the plot.

$\endgroup$

closed as off-topic by Kuba, user31159, rcollyer, m_goldberg, gwr Sep 13 '16 at 16:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Kuba, Community, rcollyer, m_goldberg, gwr
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ You mean FrameTicks? $\endgroup$ – Kuba Sep 13 '16 at 13:32
  • $\begingroup$ Try with Frame -> True $\endgroup$ – Gustavo Delfino Sep 13 '16 at 13:35
  • 2
    $\begingroup$ @MichaelE2 I have yet to vote to close, but allow me to disagree. Just above the options table in the Details section of both Plot and ListPlot is the statement "... has the same options as Graphics, with the following additions and changes". $\endgroup$ – rcollyer Sep 13 '16 at 14:38
  • 1
    $\begingroup$ @rcollyer You're free to disagree. :) In my mind, it is a borderline case, and our comments mean that people will at least think about it before deciding. $\endgroup$ – Michael E2 Sep 13 '16 at 14:56
  • 2
    $\begingroup$ @rcollyer You remind me of a time in 1993 when I told myself to remember that lesson about looking at both Plot and Graphics. I can fix the date because I remember the house we lived in. I wish the close reason read "can be found in the documentation (and easily understood)". Sometimes I vote that way. You may convince me yet in the present case. $\endgroup$ – Michael E2 Sep 13 '16 at 15:14
2
$\begingroup$
Plot[Sin[x], {x, -Pi, Pi}, Frame -> True, 
 FrameTicks -> {{All, All}, {All, All}}, ImagePadding -> All]

enter image description here

$\endgroup$
  • $\begingroup$ It works for Plot, but I find that if I use ListPlot, even if I include the FrameTicks -> {{All, All}, {All, All}} it is not showing the right and upper frame. why is that? $\endgroup$ – Physicist Sep 20 '16 at 23:21
  • $\begingroup$ It works; e.g. ListPlot[Table[Sin[x], {x, -Pi, Pi, 0.01}], Frame -> True, FrameTicks -> {{All, All}, {All, All}}, ImagePadding -> All]. $\endgroup$ – corey979 Sep 21 '16 at 6:37

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