Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

splot

Help
mahshid
2013-02-17
2013-02-23
  • mahshid
    mahshid
    2013-02-17

    hi
    i am trying to plot data from a file ,using splot
    set xrange[:] ,set yrange[:], set zrange, splot"data.dat" with pm3d
    but i am unsuccesfull,what am i doing wrong?

     
  • How did you figure that "I am unsuccessfull" is a usable description of the problem you're having?

     
  • mahshid
    mahshid
    2013-02-18

    i am new with gnuplot.i read and understood about plotting with gnuplot.i tried to plot data file.
    i can not draw a 3d graph.here it's my configuration file:
    gnuplot> set xrange [2:3]
    gnuplot> set yrange [140:180]
    gnuplot> set zrange [-1533.48192087:-1533.59547584]
    gnuplot> splot "1.dat" with pm3d
    smooth palette in windows: using 4096 of 4096 available color positions
    Warning: Single isoline (scan) is not enough for a pm3d plot.
    Hint: Missing blank lines in the data file? See 'help pm3d' and FAQ.
    what have i do?

     
    • Dave Clarke
      Dave Clarke
      2013-02-18

      Send us the content of 1.dat, it is most likely a problem with your format
      of it.
      On 18 Feb 2013 06:23, "mahshid" mahshid2244@users.sf.net wrote:

      i am new with gnuplot.i read and understood about plotting with gnuplot.i
      tried to plot data file.
      i can not draw a 3d graph.here it's my configuration file:
      gnuplot> set xrange [2:3]
      gnuplot> set yrange [140:180]
      gnuplot> set zrange [-1533.48192087:-1533.59547584]
      gnuplot> splot "1.dat" with pm3d
      smooth palette in windows: using 4096 of 4096 available color positions
      Warning: Single isoline (scan) is not enough for a pm3d plot.
      Hint: Missing blank lines in the data file? See 'help pm3d' and FAQ.
      what have i do?


      splothttps://sourceforge.net/p/gnuplot/discussion/5925/thread/c06efa15/?limit=25#5f96

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnuplot/discussion/5925/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/prefs/

       
  • mahshid
    mahshid
    2013-02-20

    my datafime

     
    Attachments
  • mahshid
    mahshid
    2013-02-20

    datafile

     
    • Dave Clarke
      Dave Clarke
      2013-02-20

      Mahshid
      See section 3.9 of FAQ here

      You need a blank line every time the x value changes.
      Currently you have:

      2.00000000 140.00000000 -1533.48192087
      2.00000000 142.85714286 -1533.48192087
      2.00000000 145.71428571 -1533.48396504
      2.00000000 148.57142857 -1533.48396504
      
      2.00000000 151.42857143 -1533.49075386
      2.00000000 154.28571429 -1533.49139830
      2.00000000 180.00000000 -1533.49449213
      2.05263158 140.00000000 -1533.52322496
      
      2.05263158 142.85714286 -1533.52394348
      2.05263158 145.71428571 -1533.52463680
      2.05263158 148.57142857 -1533.52529468
      2.05263158 151.42857143 -1533.52592767
      
      2.05263158 154.28571429 -1533.52652539
      2.05263158 157.14285714 -1533.52707269
      2.05263158 160.00000000 -1533.52756863
      ...
      

      It should be like:

      2.00000000 140.00000000 -1533.48192087
      2.00000000 142.85714286 -1533.48192087
      2.00000000 145.71428571 -1533.48396504
      2.00000000 148.57142857 -1533.48396504
      2.00000000 151.42857143 -1533.49075386
      2.00000000 154.28571429 -1533.49139830
      2.00000000 180.00000000 -1533.49449213
      
      2.05263158 140.00000000 -1533.52322496
      2.05263158 142.85714286 -1533.52394348
      2.05263158 145.71428571 -1533.52463680
      2.05263158 148.57142857 -1533.52529468
      2.05263158 151.42857143 -1533.52592767
      2.05263158 154.28571429 -1533.52652539
      2.05263158 157.14285714 -1533.52707269
      2.05263158 160.00000000 -1533.52756863
      

      You can do this with the awk script given in that faq. Script attached. Run with:
      awk -f pm3d_blanks.awk 1.dat > 1_fixed.dat

      Then plot 1_fixed.dat as you were. You shouldn't have to set the range explicitly, when it works it will automatically set the appropriate range.

      Regards
      Dave

       
  • mahshid
    mahshid
    2013-02-23

    thanks for your reply.
    splot "<awk -f="" pm3d_blanks.awk="" 1.dat="">"
    warning: Skipping unreadable file "<awk -f="" pm3d_blanks.awk="" 1.dat="">"
    warning: No usable data in this plot to auto-scale axis range
    ^
    All points x value undefined

    gnuplot> awk -f pm3d_blanks.awk 1.dat > 1_fixed.dat
    ^
    invalid command
    i'm confuse.