1

Is NumberForm not good with the following use of ListPlot? Look at my example:

 vectorj = {Rationalize[0.3],NumberForm[1.2131, 2]};
 ListPlot[vectorj]

This is not working. Is 1.21 not recognized as a number because of NumberForm which just prints out? Could anybody tell me how to output an approximate value of 1.2131 as 1.21 and then use it in ListPlot correctly?

Andrea G
  • 759
  • 3
  • 19

1 Answers1

2

In contrast to the numbers, such as 1.21 with the head Real, the NumberForm is not. Let us try with the heads

    1.2131 // Head
NumberForm[1.2131, 2] // Head

(*  Real

  NumberForm  *)

This is the reason.

Alexei Boulbitch
  • 39,397
  • 2
  • 47
  • 96