Menu

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?

     
  • Hans-Bernhard Broeker

    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

     
  • 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.

     
  • Prabha

    Prabha - 2017-02-28

    I have two .dat files having the x y z datas something like below:
    0.479634542342 -0.895590427224 4.649207829043
    2.284180032777 -1.511749854312 4.308606204345
    2.973037290125 -1.368760574268 3.969283015984
    0.177237228194 -0.128242334136 4.527094931073
    3.396703993265 -2.186392493657 3.262629635444
    2.837727771166 -0.557962811680 4.123695015150
    2.192011217955 0.164443012029 4.300915139062
    3.927666613803 -1.062355735031 3.321520949395

      3.458631900124     -0.489963589211      3.700605669594  
      3.193517285097      0.376826436752      3.637676436946  
      2.494211131140      1.170859173662      3.627903642922  
      3.904919769582     -2.569230565607      2.275154779427  
      4.418632526436     -0.311766674402      2.492548489786  
      3.478630557623      0.983533596882      3.084073462581  
      2.753099506023      2.009020117959      2.977530813744 
      1.442568451809      0.995015725124      4.111569359228
    
      4.574235796277     -2.092569474202      1.630525933607  
      4.051418748883     -1.893801380967      2.736926106468  
      3.929234749618      0.117462572682      3.090917565033  
      3.516661077040      1.976889052610      2.357271817063  
      1.867187709422      1.758007802765      3.553233540629  
      1.127536324444      2.411494651751      3.158021360710
      4.547716689083     -1.161293924597      2.314197495952  
      4.712101592741     -0.438990729996      1.767270218848
    
      4.358052081329      0.662072589050      2.221827977342  
      3.912357245593      1.361509893195      2.383895004067  
      2.808534222589      2.784343082410      2.067794863211  
      1.809633271785      2.666322440747      2.727435460525  
      0.704219373349      2.920500673449      2.595482794734 
      4.875792647959     -1.493850912151      1.398340918216  
      4.894891523209     -0.649596026432      0.768076807769  
      4.604077323665      0.520449908423      0.999428149137
    
      4.212834973462      1.539446681934      1.652886436583  
      3.794666808278      2.205441765923      1.687913529038  
      2.704304464578      3.263864423726      1.294917290642  
      1.713655650571      3.155651943147      1.889690131772
      1.033359597583      3.571469621819      1.587733578864  
      5.030535221131     -1.554079139998      0.463189111470  
      4.984086545315     -1.299829598359     -0.235662237888  
      4.912937857730     -0.129040867601      0.188421924594
    
      4.335762776437      1.621307082888      0.940819094432  
      4.048678915709      2.292446712673      0.839885448407  
      3.371729377974      2.955617496385      1.191597088900  
      3.112099289790      3.329990837796      0.580725210987  
      2.412687902058      3.559115071986      0.326489173412  
      1.792991156270      3.492998298698      0.750690132645  
      4.775365818799     -2.327161270030     -0.169191399201  
      4.757808014475     -0.893386816407     -1.423682208001
    
      4.832790150045     -0.134218019869     -0.655377217975  
      4.551646787499      0.957420604986     -0.087304382540  
      4.227722329855      2.158959925390      0.040442146430  
      3.793747694488      2.897607642677      0.215518262565  
      3.275175338709      3.242386756147     -0.183395862758  
      2.424750163135      3.646449669948     -0.438479132885  
      1.393387656064      3.811896695958      0.022105836530  
      0.626729334371      3.852886820162      0.459064691661
    
      from the above dats I want to splot in colour gradient but the output what I am getting is the first attatchment but I want something like second attatchment fig(c) which is the colour gradient version of fig(b). here is the script which I am using:
    

    set border 4095 front lt black linewidth 1.000 dashtype solid
    set minussign
    set view map scale 1
    set samples 50, 50
    set isosamples 50, 50
    unset surface
    set style data pm3d
    set style function pm3d
    set xyplane relative 0
    set xlabel "x"
    set xrange [ -15.0000 : 15.0000 ] noreverse nowriteback
    set ylabel "y"
    set yrange [ -15.0000 : 15.0000 ] noreverse nowriteback
    set zrange [ -15.0000 : 15.00000 ] noreverse nowriteback
    set pm3d implicit at b
    splot "ves.dat", "B_dis.dat"

      Please help to solve my problem
      Thanks in advence
    
     

Log in to post a comment.