# How to plot data that are already in scientific form? [duplicate]

I've got an array of data shown in scientific form. Which looks like this:

x = {0.0001,ScientificForm[0.999890436521418]}


Now I'm trying to use ListPlot to plot this data, but the problem is that the point which is in Scientific form doesn't show up in my plot (only 0.0001 is shown).

ListPlot[x]


How can I cancel this ScientificForm curse off my data? There are Megabytes of data in this form, So I'd need a function to take care of them all for me. Thanks in advance :)

P.S I've tried using x = N[x,16], and some other number forms but no luck.

Edit: Kuba really helped with his comment. Thanks!

• ListPlot[x /. ScientificForm -> (# &)], in general don't keep **Form in data but use them only when you need to display something.
– Kuba
Mar 6 '17 at 11:20
• at least closely related: 92885
– Kuba
Mar 6 '17 at 11:55
• And 92226 too. Mar 6 '17 at 13:12
• @Kuba Thanks! 48266 is exactly what I've been looking for! Mar 6 '17 at 14:13

Substituting any head that will act as the identity function for ScientificForm will work. I suggest Identity or Sequence; kuba suggests (#&). Any of these will work. Let's see how it goes with some data that better approximates having many data points to plot.

SeedRandom[0];
data =
With[{n = 10},
MapThread[{#1, ScientificForm[#2]} &, {.01 Range[n], RandomReal[1, n]}]];


Then using Identity, we get

ListPlot[data /. ScientificForm -> Identity]


### Update

Kuba raises the issue that, in the extended case where the ScientificForm expression contains options, Identity and Sequence will fail while (#&) does not. That is true and it makes (#&) much more robust; I highly recommend its use.

Here is another solution that is also robust.

SeedRandom[0];
data2 =
With[{n = 10},
{#1, ScientificForm[#2, 10, DigitBlock -> 3]} &,
{.01 Range[n], RandomReal[1, n]}]];
ListPlot[data2 /. ScientificForm[u_, ___] -> u]


• Identity will complain about ScientificForm[0.999890436521418, DigitBlock -> 3] and Sequence may introduce unexpected output. I know it is not the OP case be can quickly escalate.
– Kuba
Mar 6 '17 at 14:01
• @Kuba. You make a good point. But as you say, that case was not considered in the user's question. Mar 6 '17 at 14:25
• @Kuba. BTW this is a good example of why you should write a real answer and not spread a superior answer over multiple comments. If you had written a real answer, where you discussed how (#&) has the advantage of working in extended cases, this question would have a better answer than mine. Mar 6 '17 at 14:33
• Sorry, didn't want to mess things up, I just don't always have time to write a good answer, nor I find it easy to phrase it nicely. I also suspected this is a duplicate but I didn't found it quickly. Next time I will add a comment that this is the case and that I used #& intentionally :-/
– Kuba
Mar 6 '17 at 14:43
• ToExpression could help sometimes too, especially when data is saved in rational form. Mar 13 '17 at 23:34