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.

Is there any way to make Mathematica to show the legend labels like a real number rather than in fraction form? I read the BarLegend options, however they are just related to graphics so I just set the PlotLegend to Automatic.

A sample of legend I have problem with is shown below:

MatrixPlot[Rm1,
 ColorFunction -> ColorData["GrayTones"],
 ImageSize -> 200,
 PlotLegends -> Automatic]

enter image description here

share|improve this question
    
Can you please accept answers to the questions that you've asked so far, if they've actually been helpful (you can accept only one per question)? Accepting it indicates to other users that a particular answer was indeed helpful to you and also rewards the answerer with +15, as a token of appreciation for having helped write an accepted answer. –  rm -rf Apr 7 '13 at 1:41

1 Answer 1

This should do it:

plot = MatrixPlot[Rm1, ColorFunction -> ColorData["GrayTones"],
   ImageSize -> 200, PlotLegends -> Automatic];
MapAt[N, plot, 2]

enter image description here

share|improve this answer
    
ha ha! simple and effective! Thanks Brett. –  K-1 Apr 6 '13 at 9:09

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.