Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to label one of the frames on a ListPlot as log_10(x). When I try ListPlot[twodimndata,Frame -> True, FrameLabel -> {Style[Log10[r], 20], Style[d, 20]}} the output on the x-axis is Log[r]/Log[10], rather than Log_10[r] as I expected

How can I get Mathematica to plot Log_10[r] on the x-axis?

share|improve this question
    
LogPlot? Its under LogPlot in Mathematica help. –  drN Oct 15 '12 at 23:25
add comment

1 Answer

up vote 2 down vote accepted

You'll want to use HoldForm[] to prevent the automatic evaluation of Log10[r]:

data = SortBy[Transpose[{Log[RandomReal[{1, 10^5}, 6]], RandomReal[1, 6]}], First];

ListPlot[data, Frame -> True, FrameLabel -> {Style[HoldForm[Log10[r]], 20], Style[d, 20]},
         Joined -> True]

picture

share|improve this answer
    
Perfect, thanks. –  cosmoguy Oct 15 '12 at 23:27
    
On the other hand, you might be interested in the function ListLogLinearPlot[]... –  J. M. Oct 15 '12 at 23:29
    
Yeah, I gave ListLogLinearPlot a go originally, but the numbers on the frame were cluttered, so I thought I would try the other way to see how it looked. –  cosmoguy Oct 15 '12 at 23:40
add comment

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.