ListPlot a list of numbers in string format?

Hi,

What is the problem in using ListPlot command?

In[6]:= S1 = {"66.4", "2.8", "61.5", "504.4", "155.5", "155.5", "", 
  "", "", "", "", "", "", "", ""}

Out[6]= {"66.4", "2.8", "61.5", "504.4", "155.5", "155.5", "", "", \
"", "", "", "", "", "", ""}

In[7]:= S11 = DeleteCases[S1 /. "" -> x, x]

Out[7]= {"66.4", "2.8", "61.5", "504.4", "155.5", "155.5"}

In[8]:= ListPlot[S11]

Try this:

ListPlot[ToExpression@S11]

To add to the comment by Hans, the issue is that you’re trying to use ListPlot on strings of real numbers, not real numbers themselves.

To get around this, Hans suggests using ToExpression to convert your strings of real numbers into proper numbers that ListPlot can work with.

In[10]:= ToExpression["12.2"]
Out[10]= 12.2