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

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

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?


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.

| improve this answer | |
  • $\begingroup$ may N work rather than NumberForm? $\endgroup$ – Andrea G Apr 28 '17 at 12:49

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