Announcement

Collapse
No announcement yet.

Gnuplot

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gnuplot

    Anybody used GNUPlot?

    If I have some data of following format which shows 5 columns in file "test"

    1 2 3 4 5
    5 4 3 2 1

    I can plot column 3 against 1 in gnuplot by giving:

    plot "test" using 1:3

    If I want to plot square of column 3 I will use:

    plot "test" using 1: ($3*3) ... without the space after 1:

    Now if I am to prepare shell script for this, $3 will refer to the third argument being passed to the script and not to column 3 ....

    Anybody knows how to do this?

  • #2
    Wait for moderators they will be help you
    manana

    Comment


    • #3
      Originally posted by Omar Usman View Post
      Anybody used GNUPlot?

      If I have some data of following format which shows 5 columns in file "test"

      1 2 3 4 5
      5 4 3 2 1

      I can plot column 3 against 1 in gnuplot by giving:

      plot "test" using 1:3

      If I want to plot square of column 3 I will use:

      plot "test" using 1: ($3*3) ... without the space after 1:

      Now if I am to prepare shell script for this, $3 will refer to the third argument being passed to the script and not to column 3 ....

      Anybody knows how to do this?
      I don't use it.

      It should be $3^2 though.

      Why will your $3 change if you run it from a shell?

      Just run it with the gnuplot command.

      Comment

      Working...
      X