0
$\begingroup$

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?

$\endgroup$

marked as duplicate by Kuba Apr 28 '17 at 12:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1
$\begingroup$

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.

$\endgroup$
  • $\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.