Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.