|
From: pban92 <pb...@ya...> - 2011-02-15 18:34:06
|
I am comparing two histograms (red and green) using gnuplot as in here http://old.nabble.com/file/p30933874/gnufence0.jpg gnufence0.jpg but the red is partially covered by the green. To avoid this overlapping, a fence plot as shown in here http://old.nabble.com/file/p30933874/gnufence.jpg gnufence.jpg is a good solution undoubtedly. Question is how do I do this in gnuplot? Suggestions would be highly appreciated. Thanks! -- View this message in context: http://old.nabble.com/fence-plotting-in-gnuplot-tp30933874p30933874.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: pban92 <pb...@ya...> - 2011-02-15 19:06:13
|
here is my code, clear set style fill solid 1.0 border -1 binwidth=0.01 bin(x,width)=width*floor(x/width) + binwidth/2.0 plot 'case001.nvd' using (bin($1,binwidth)):(1.0) smooth freq w boxes,\ 'case097.nvd' using (bin($1,binwidth)):(1.0) smooth freq w boxes -- View this message in context: http://old.nabble.com/fence-plotting-in-gnuplot-tp30933874p30934166.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Tait <gnu...@t4...> - 2011-02-15 23:48:40
|
> I am comparing two histograms (red and green) using gnuplot as in here > http://old.nabble.com/file/p30933874/gnufence0.jpg gnufence0.jpg but the > red is partially covered by the green. To avoid this overlapping, a fence > plot as shown in here http://old.nabble.com/file/p30933874/gnufence.jpg > gnufence.jpg is a good solution undoubtedly. Question is how do I do this > in gnuplot? Suggestions would be highly appreciated. Thanks! First, let me answer your question. You can do fence plots by following the approach in http://gnuplot.sourceforge.net/demo_4.4/surface1.html (just below halfway down). However, fence plots are, in my opinion, the wrong solution for your problem. Because of the pseudo-3D perspective, it is almost imposible to directly compare the histograms in your second graph. Does "SF4 7a" or "eSF2 7a" have the higher peak, for example? Instead, may I suggest you use one of: - a clustered histogram second plot, http://gnuplot.sourceforge.net/demo_4.4/histograms.html - a multiplot http://t16web.lanl.gov/Kawano/gnuplot/gallery/pressureSlopes.html - transparency http://gnuplot.sourceforge.net/demo_4.4/transparent.html Any of these would more clearly present the data and comparison you're apparently trying to make. |
|
From: pban92 <pb...@ya...> - 2011-02-16 17:09:55
|
@Tait, Thank you for your suggestions! I know what you mean. Now, 1. Here is the output http://old.nabble.com/file/p30936652/transp.jpg transp.jpg I do not get the transparency effect with, set style fill transparent solid 0.50 noborder 2. I liked the cluster histogram but confused about how my data should be arranged as i did not find immigration.dat file to take a look inside it. Many thanks! Tait-2 wrote: > >> I am comparing two histograms (red and green) using gnuplot as in here >> http://old.nabble.com/file/p30933874/gnufence0.jpg gnufence0.jpg but the >> red is partially covered by the green. To avoid this overlapping, a fence >> plot as shown in here http://old.nabble.com/file/p30933874/gnufence.jpg >> gnufence.jpg is a good solution undoubtedly. Question is how do I do >> this >> in gnuplot? Suggestions would be highly appreciated. Thanks! > > First, let me answer your question. You can do fence plots by following > the approach in http://gnuplot.sourceforge.net/demo_4.4/surface1.html > (just below halfway down). > > However, fence plots are, in my opinion, the wrong solution for your > problem. Because of the pseudo-3D perspective, it is almost imposible to > directly compare the histograms in your second graph. Does "SF4 7a" or > "eSF2 7a" have the higher peak, for example? > > Instead, may I suggest you use one of: > - a clustered histogram > second plot, http://gnuplot.sourceforge.net/demo_4.4/histograms.html > - a multiplot > http://t16web.lanl.gov/Kawano/gnuplot/gallery/pressureSlopes.html > - transparency > http://gnuplot.sourceforge.net/demo_4.4/transparent.html > > Any of these would more clearly present the data and comparison you're > apparently trying to make. > > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/fence-plotting-in-gnuplot-tp30933874p30936652.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Tait <gnu...@t4...> - 2011-02-16 22:31:32
|
The set style fill syntax you have ought to work. It did for me. Perhaps the particular flavor of JPG terminal that you're using doesn't support it? (That seems unlikely, as I think both libgd and Cairo support transparency.) Transparency support wasn't present pre-4.4, but then you should have gotten an error on the set command. The files for all the demos are in the demo directory of your gnuplot installation. Normally they'd also be available to in the SourceForge CVS file browser, but that is down now because of the attacks. Histograms are a 1-D plot type, so I'm not sure how/if it will work with smoothing. You might have to do the frequency smoothing in one pass to generate a data table (help table), and then plot the frequency-smoothed data file as a histogram using 2:xticlabels(1) or something similar. In case you can't find it, here is the first few columns of immigration.dat: # IMMIGRATION BY REGION AND SELECTED COUNTRY OF LAST RESIDENCE # Region Austria Hungary Belgium Czechoslovakia ...etc 1891-1900 234081 181288 18167 - 1901-1910 668209 808511 41635 - 1911-1920 453649 442693 33746 3426 1921-1930 32868 30680 15846 102194 1931-1940 3563 7861 4817 14393 1941-1950 24860 3469 12189 8347 1951-1960 67106 36637 18575 918 1961-1970 20621 5401 9192 3273 > 1. Here is the output http://old.nabble.com/file/p30936652/transp.jpg > transp.jpg I do not get the transparency effect with, > > set style fill transparent solid 0.50 noborder > > 2. I liked the cluster histogram but confused about how my data should be > arranged as i did not find immigration.dat file to take a look inside it. > > Many thanks! |
|
From: pban92 <pb...@ya...> - 2011-02-17 11:07:43
|
@Tait, I really appreciate your continuous help. 1. The transparency problem was solved after I got the latest version. 2. For the cluster, it seems the following code is correct as it gave no error but the never ending execution of the graph is taking ages forcing me to quit. Is my code wrong? My text file has five columns with 1.5 million rows. clear set boxwidth 0.75 absolute set style fill solid 1.00 border -1 set style data histogram set style histogram cluster gap 1 plot 'set1st01.txt' using 1, '' using 2, '' using 3, '' using 4, '' using 5:xtic(1) 3. Referring to OP, is there any built in gnuplot built in function for waterfall/fence plotting? Tait-2 wrote: > > > Transparency support wasn't present pre-4.4, but then you > should have gotten an error on the set command. > > > -- View this message in context: http://old.nabble.com/fence-plotting-in-gnuplot-tp30933874p30948670.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Tait <gnu...@t4...> - 2011-02-17 20:21:09
|
It's probably not reasonable to ask gnuplot to draw 1.5 million tic marks (the using with xtic(1)). So don't do that. Instead, only draw every 150000th xtic or so, using every. Something like: plot 'set1st01.txt' using 1, '' using 2, '' using 3, '' using 4, '' using 5, '' using (0):xtic(1) every 150000 notitle The last plot item just plots the constant value 0, and creates a tic mark, every 10000th row. See "help every" for the complete syntax. As for a built-in way to do fence plots, there is only the link I gave originally, using parametric mode. > ... My text file has five columns with 1.5 million > rows. > > clear > set boxwidth 0.75 absolute > set style fill solid 1.00 border -1 > set style data histogram > set style histogram cluster gap 1 > plot 'set1st01.txt' using 1, '' using 2, '' using 3, '' using 4, '' using > 5:xtic(1) > > 3. Referring to OP, is there any built in gnuplot built in function for > waterfall/fence plotting? |