• plotting text

    From Jan Schmidt@21:1/5 to All on Tue Jun 6 01:25:35 2023
    Hi,

    is there a way to plot a datafile with text and replace the text with numbers?

    i.e. the datafile looks like

    1684746646.005043 open standby 0.3
    1684746646.045847 closed standby 0.2

    and I want a line chart where I can see the movement from "open" to "closed" as a jump.

    plot "datafile" u 1:2 replace("open",1), replace("closed",2) w l, "datafile" u 1:4 w l

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?J=c3=b6rg_Buchholz?=@21:1/5 to Jan Schmidt on Wed Jun 7 08:18:13 2023
    On 06.06.2023 10:25, Jan Schmidt wrote:
    Hi,

    is there a way to plot a datafile with text and replace the text with numbers?

    i.e. the datafile looks like

    1684746646.005043 open standby 0.3
    1684746646.045847 closed standby 0.2

    and I want a line chart where I can see the movement from "open" to "closed" as a jump.

    plot "datafile" u 1:2 replace("open",1), replace("closed",2) w l, "datafile" u 1:4 w l


    1684746646.005043 open standby 0.1
    1684746646.045847 closed standby 0.2
    1684746646.005043 open standby 0.3
    1684746646.045847 closed standby 0.4
    1684746646.005043 open standby 0.5
    1684746646.045847 open standby 0.6
    1684746646.005043 open standby 0.7
    1684746646.045847 closed standby 0.8

    plot [0:1.0][0:2.0] 'file' u 4:(strcol(2) eq "open" ? 1.0:0.0) w histeps



    Jörg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)