2
$\begingroup$

I am working with mathematica 9.0 and I want to make a plot importing data from a .dat file. My issue is that I don't know how to show y axis in scientific notation. My values run from 0 to approx 4000 in the y axis. Can anybody help me? thank you

$\endgroup$
1

1 Answer 1

3
$\begingroup$
fakedata = Transpose[{Range[500], RandomReal[4000, {500}]}];
ListLinePlot[fakedata, 
 Ticks -> {Automatic, {#, ScientificForm@#} & /@  Range[0., 4000., 1000.]}, 
 PlotRange -> {0, 4500}]

enter image description here

$\endgroup$
7
  • $\begingroup$ that doesn't work. Basically I have a .dat of 500 points and when I listlineplot it the y axis runs from 0 to 4000, and the only thing I want is to show 4x10^3 instead of 4000 $\endgroup$
    – user25578
    Commented Sep 22, 2014 at 11:48
  • $\begingroup$ @user25578, please see the updated answer... $\endgroup$
    – kglr
    Commented Sep 22, 2014 at 12:02
  • $\begingroup$ Thank you, now the ticks are how I wanted, but now I am not able to write the axes labels $\endgroup$
    – user25578
    Commented Sep 22, 2014 at 14:11
  • $\begingroup$ user25578, did you try something like AxesLabel -> {"axis x", "axis y"}? $\endgroup$
    – kglr
    Commented Sep 22, 2014 at 14:17
  • $\begingroup$ Yes, now I've tried AxesLabel and it works. I was using FrameLabel. It's not possible to write frame labels in scientific notation? Thank you for your help $\endgroup$
    – user25578
    Commented Sep 22, 2014 at 14:19

Your Answer

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

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