Interactive user input with gnuplot

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Interactive user input with gnuplot

theozh
Is there a way in gnuplot to interactively enter a few values, i.e.
numbers and strings?

The idea is to enable users which are not familiar with gnuplot and do
not want to (are not able to or should not) edit a gnuplot script to
generate plots which require a few custom values which are then stored
in user variables for further use in the script.

The command "pause" allows some very limited user input

pause mouse keypress "Type a letter"
# Returning the ASCII value of the key pressed in MOUSE_KEY
or
pause -1 "Hit a key to continue"

But I am looking for a simple popup window, e.g. like:

+------------------+
| Sample: .......  |
| Start:  .......  |
| Stop:   .......  |
|                  |
|   OK    Cancel   |
+------------------+

Any ways to achieve this?


------------------------------------------------------------------------------
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|

Re: Interactive user input with gnuplot

Jose Gama
The idea is to get user input, do some calculations and use the result on a plot, right?If you use R then there are demos here on how to do that:
CRAN - Package Rgnuplot

 
|  
|   |  
CRAN - Package Rgnuplot
   |  |

  |

 
For Python, C, shell scripts, etc there is similar stuff online.
Sometimes the calculations are too complex or the data has to be prepared before the plot, fortunately gnuplot is very easy to be called from any language or environment.
      From: theozh <[hidden email]>
 To: [hidden email]
 Sent: Friday, July 29, 2016 4:11 PM
 Subject: [Gnuplot-info] Interactive user input with gnuplot
   
Is there a way in gnuplot to interactively enter a few values, i.e.
numbers and strings?

The idea is to enable users which are not familiar with gnuplot and do
not want to (are not able to or should not) edit a gnuplot script to
generate plots which require a few custom values which are then stored
in user variables for further use in the script.

The command "pause" allows some very limited user input

pause mouse keypress "Type a letter"
# Returning the ASCII value of the key pressed in MOUSE_KEY
or
pause -1 "Hit a key to continue"

But I am looking for a simple popup window, e.g. like:

+------------------+
| Sample: .......  |
| Start:  .......  |
| Stop:  .......  |
|                  |
|  OK    Cancel  |
+------------------+

Any ways to achieve this?


------------------------------------------------------------------------------
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info


 
------------------------------------------------------------------------------
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|

Re: Interactive user input with gnuplot

theozh
thanks, Joseph, for that hint.
Actually, my hope was to realize this in gnuplot itself and to avoid an
additional program and installation. Nevertheless, I will have a look at
it...



------------------------------------------------------------------------------
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info