# Fastest way for data input into StreamPlot function

I'm interested in looking at graphing the phase portraits of 2x2 autonomous ODEs, and I'm using the StreamPlot function.

Here is one simple example:

StreamPlot[{-y, -2 x}, {x, -5, 5}, {y, -5, 5}]


I'm finding it very tedious to continue typing , {x,-5,5}, {-5,5} etc. as part of every separate plot I construct. Is there some faster way to input my range? I don't want to have to rely on ctrl c ctrl v etc.

I'm sorry if this is a silly question!

• Make a button with the appropriate placeholders, perhaps? – J. M. will be back soon May 28 '16 at 15:14
• Silly that I didn't think of that, thank you! – kiwi703 May 28 '16 at 15:39
• Welcome! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 May 28 '16 at 16:34
• Thank you! This community is very intimidating because everyone seems like an expert and I feel I can't contribute anything yet, but I'll do those suggestions – kiwi703 May 29 '16 at 1:39

Perhaps,

ClearAll[inpField]
inpField[arg_, fs_: 5] := InputField[arg, FieldSize -> fs, Background -> Yellow,
Appearance -> "Frameless"]

Interpretation[{f = {-y, -2 x}, xmin = 0, xmax = 1, ymin = 0, ymax = 1},
Panel@Row[{"StreamPlot[", inpField[Dynamic[f], 12],
", \n ", Invisible["StreamPlo"], "{x, ",
inpField[Dynamic[xmin]], ",", inpField[Dynamic[xmax]],
"}, \n ", Invisible["StreamPlo"], "{y, ",
inpField[Dynamic[ymin]], ",", inpField[Dynamic[ymax]], "}]"}],
StreamPlot[f, {x, xmin, xmax}, {y, ymin, ymax}]]


Fill-in the input fields and Shift+Enter: