packages icon



 xpplot(1)                                                         xpplot(1)
                               August 19, 1993



 NAME
      xpplot - a simple tool to plot Your data in X-Windows

 SYNOPSIS
      xpplot [options] [files]

 DESCRIPTION
      INPUT DATA FORMAT

      text files containing values separated by blanks (space,new-line,tab)

      ARGUMENTS

      It takes one or two arguments - the names of files with Your data to
      be plotted.

      When called

      - with one argument,
         xpplot plots each value from the input file along y axes against
      its number along x axes.

      - with two arguments,
          xpplot plots Yn versus Xn, taking Xn from the first file and
           Yn from the second file.

      - otherwise
         it prints a little help
         try xpplot -h for more help

      (You can use a little script to separate columns from a multi-column
      data file : awk '{print $2}'     to extract the 2nd column for example
      or You can use the command paste to combine them back together.)


      FEATURES

      You can

      - see a detail by zoom using mouse

      - unzoom

      - get back the original settings

      - make the picture sleep for large reconfiguration
         and make it wake up then back again

      - make a Hardcopy to a PostScript file
        ( which can be inserted to a TeX document e.g.
          by PSBOX by Jean Orloff)



                                    - 1 -           Formatted:  July 1, 2025






 xpplot(1)                                                         xpplot(1)
                               August 19, 1993



      - change the way individual points are connected
         ( this was the first feature I missed in XGraph)

      - change the index of the first and the last point to be plotted
        ( to see just a definite part of a complicated picture)

      - make the attractor reconstruction using the Taken's theorem
        (when called with one argument - which assumes that Your data
         is a time series sampled in equidistant time intervals)

      - read the coordinates of the point pointed to by the mouse
         by clicking the mouse button
         (without moving the mouse which would make a zoom)

      - see a growing file on-line in real time
         (this can be useful
           when the computation of your results is time demanding
           or to see measured data on-line)


      HOW TO MAKE DISCONNECTED LINES

      value -0.3737 in Your data has special meaning : it is not plotted and
      it is not connected with the previous and with the next point (when
      calling xpplot with two datafiles, use the breaker -0.3737 in both
      files)

      values -0.373710 ... -0.373715 in Your data also change the way how
      the points are connected in the same style as clicking a mouse button
      in the line window (try it) (see demo files x and y and try xpplot x
      y)


      OPTIONS

      -h  help

      -b  batch run to make a Hardcopy file without X-Window spectacle

      -t  "Title of the picture" to specify the title (useful with -b)

      -ln where n is an integer between 0 and 5
          set the way individual points are connected (useful with -b)

      -f "HardCopyFile" to specify the name of the output file for hardcopy
          default is hcopy0.ps
          if this already exists hcopy1.ps will be used (and so on)

      -pn where n is a number (it can be decimal)
          to see Your new data once in n seconds
          0 turns this mode off, which is default



                                    - 2 -           Formatted:  July 1, 2025






 xpplot(1)                                                         xpplot(1)
                               August 19, 1993



      -F FontName to specify Your favorite Font
         (only for the interactive buttons)

      -g  WIDTHxHEIGHT+Xoffset+Yoffset  to specify the geometry
           of the main window
          (useful in a script which calls xpplot more than once
           to make more xpplot windows on Your screen)


      HOW TO COMPILE

      xpplot.c is written in simple C using only Xlib library (and libm.a).

      if you have the file xpplot.tar.Z type

      $ uncompress xpplot.tar.Z

      $ tar xf xpplot.tar

      $ cc -o xpplot xpplot.c -lm -lX11

      ON-LINE

      To see how the -p option works copy the following C program to a file
      "lor.c" and copy the following script to a file "see" and then run the
      script "see".  The program "lor.c" solves a set 3 differential
      equations (the Lorenz model in chaotic regime) using Euler method and
      writes the output to files "lor.t", "lor.x", "lor.y" and "lor.z".
      After computing 100 points, it sleeps for 1 second before writing each
      new point.  The script "see"

      1. compiles the program lor.c

      2. runs the compiled program in background

      3. waits 1 second so that the data files can be created

      4. starts 4 runs of xpplot in background to open 4 windows
         for plotting the results of the program lor.

      ----------------------------------------------------
      /* file lor.c */
      # include <stdio.h>
      # include <unistd.h> /* for sleep */
      main ()
      {
       int i,it=100,im=1000;
       double x=10, y=20, z=40, h=0.02, t=0, s=10, r=28, b=8.0/3.0;
       FILE
        *ft = fopen ("lor.t","w"),
        *fx = fopen ("lor.x","w"),



                                    - 3 -           Formatted:  July 1, 2025






 xpplot(1)                                                         xpplot(1)
                               August 19, 1993



        *fy = fopen ("lor.y","w"),
        *fz = fopen ("lor.z","w");

       for (i=0;i<im;i++) {
        t += h;
        x += h * (s*(y-x));
        y += h * (r*x-y-x*z);
        z += h * (x*y-b*z);
        (void) fprintf (ft,"%G0,t);
        (void) fprintf (fx,"%G0,x);
        (void) fprintf (fy,"%G0,y);
        (void) fprintf (fz,"%G0,z);
        (void) fflush ( (FILE*) NULL);
        if (i>it) (void) sleep(1);
       };
       (void) printf ("%G %G %G %G 0,t,x,y,z);
       return (0);
      } /* mani */
      /* end of file lor.c */

      ----------------------------------------------------

      # file see
      cc -o lor lor.c
      lor &
      sleep 1
      xpplot -p 1 -g 620x470+10+30   -l 3  lor.x &
      xpplot -p 1 -g 620x470+650+30  -l 3  lor.y &
      xpplot -p 1 -g 620x470+10+543  -l 3  lor.z &
      xpplot -p 1 -g 620x470+650+543 -l 3  lor.x lor.y &
      # end of file see

      ----------------------------------------------------


 SEE ALSO
      xpplot with no arguments  prints a little help

      xpplot -h  prints more help

      programs plotmany, plotnoaxes, plotmax

      in /usr/local/bin











                                    - 4 -           Formatted:  July 1, 2025