|
From: Thomas S. <t.s...@fz...> - 2010-01-31 16:23:55
|
you are only plotting one surface and your color specification is not correct (linecolor rgb "#aabbcc") you don't need any linecolor, linewidth, title, ... options when 'plotting' into a table: splot "data.txt" using 1:2:5, "data.txt" using 1:2:4 is sufficient. have a look at the 'table' file with a normal text editor - you will realize that there are isolines for 2 surfaces, separated by a double linefeed. and - there are only 3 numbers for each data point - only 'using 1:2:3' will work. your plot command will have to plot 2 surfaces, selected using the 'index' option: splot 'tmp2.dat' using 1:2:3 index 0 with lines title "w1s" lc rgb "#005500" linewidth 2.5, 'tmp2.dat' using 1:2:3 index 1 with lines title "w1" lc rgb "#000000" linewidth 2.5 I'm using GNUPLOT 4.2 patchlevel 2 for Windows (32 BIT). Here is my complete code: set xrange[4:11]; set yrange [3:*]; set xlabel "r"; set ylabel "d"; set zlabel "sec"; set dgrid3d; set table 'tmp2.dat'; splot "data.txt" using 1:2:5 with lines title "w1s" lc rgb "#005500" linewidth 2.5, "data.txt" using 1:2:4 with lines title "w1" lc rgb "#000000" linewidth 2.5; unset table; unset dgrid3d; set key left; splot 'tmp2.dat' using 1:2:($1>$2?$3:0/0) with lines title "w1s" lc "#005500" linewidth 2.5, 'tmp2.dat' using 1:2:($1>$2?$4:0/0) with lines title "w1" lc "#000000" linewidth 2.5; the output should produce one plot in green and one in black. However, they are both the same. The data-File is as follows: 4, 3, 0, 0.086000, 0.125000 6, 3, 0, 0.515000, 0.397500 6, 5, 0, 0.374500, 0.296000 8, 3, 0, 2.871000, 1.645000 8, 5, 0, 22.682500, 12.909000 10, 3, 0, 9.391000, 5.679000 Thomas Sefzick wrote: > > i'm unable to reproduce this. please provide the gnuplot version > you are using and information about which terminal you are using. > > > trailblazerger wrote: >> >> This works fine. However: you can't use colors this way for several >> plots, i.e. >> >> ... >> splot 'tmp.dat' using 1:2:($1>$2?$3:0/0) with lines lc rgb "#666666", >> 'tmp.dat' using 1:2:($1>$2?$3:0/0) with lines lc rgb "#000000"; >> >> >> just produces two black plots which is confusing. >> >> >> >> Thomas Sefzick wrote: >>> >>> 1st plot into a table: >>> >>> set dgrid3d >>> set table 'tmp.dat' >>> splot "myfile.txt" using 1:2:3 ... >>> unset table >>> >>> then use this table as datafile for the final 'splot' command >>> omitting all points with r<=d : >>> >>> unset dgrid3d >>> splot 'tmp.dat' using 1:2:($1>$2?$3:0/0) ... >>> >>> >>> >> >> > > -- View this message in context: http://old.nabble.com/splot-and-partial-data-tp27315271p27394012.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |