# Convert InputField to a number for ListLinePlot

I have a list of InputFields that I want the user to enter. This list should then be plotted. When I try to plot the list it does not show up because the items in the list have the Head InputField and are not a number. I have tried using all the conversion tricks I can.

HATableData :=
Select[InsertColumn[Table[With[{i = i, j = j},
InputField[Dynamic[HA[[i, j]]],Number]],{i, 1, Length[HA]},
{j, 2, Length[HA[[1]]]}], HTNames, 1], #[[1]] == Truck &]


{{CAT 793D, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897, 0.897}}

Head[HATableData[[1, 2]]]


InputField

ListLinePlot[HATableData[[1, 2 ;;]], PlotMarkers -> Automatic]


The Plot returns a graph with nothing on it. I have even tried to convert it to a string first but all I get is this

ToString[HATableData[[1, 2]]]


"InputField[Dynamic[HA[[1,2]]], Number, FieldSize -> {4, 1}, Appearance -> Frameless, Alignment -> Right]"

In other similar questions it looks like you can use InputField data inside a function and then plot the function using Plot but in this case I want to simply plot the numbers themselves on a ListLinePlot and not using a function inside a Plot.

-
It looks like ListLinePlot[HA[[1, 1 ;;]], PlotMarkers -> Automatic], or simply ListLinePlot[HA[[1]], PlotMarkers -> Automatic], would work, but I can't check without working example code. Perhaps the index 1 should be changed to the first Truck. HATableData appears to be the input GUI, and HA appears to be the data it works on. You might look up Setting, but working with the data seems better. –  Michael E2 Jun 24 '13 at 12:41
add comment