|
From: howudodat <pe...@ho...> - 2013-04-12 01:31:46
|
I am trying to make a waterfall / cascade plot of csv data. The data is 8192 rows of data x 600 columns of time. The first column is a frequency label, the first row is shown below but doesn't actually exist in the data file, neither do the spaces, they are shown just for ease of reading. Frequency, Sec1, Sec2, Sec3...Sec600 1e8, -95, -90, -92 1.1e8, -100, -101, -103 ... The data represents 600 seconds of fft data. I would like the plot to look something like the attached image. The x axis should be the columns of data (time), the y axis should be each row (frequency). The z axis is intensity and I'm hoping can be displayed both in height as well as color. I can control the input data if needed to remove the first column, but then I would need to be able to specify the start/ stop range of the labels <http://gnuplot.10905.n7.nabble.com/file/n17268/test.png> -- View this message in context: http://gnuplot.10905.n7.nabble.com/Waterfall-Cascade-Plot-tp17268.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Ethan A M. <EAM...@gm...> - 2013-04-12 02:28:15
|
On Thursday, 11 April 2013, howudodat wrote: > I am trying to make a waterfall / cascade plot of csv data. The data is > 8192 rows of data x 600 columns of time. The first column is a frequency > label, the first row is shown below but doesn't actually exist in the data > file, neither do the spaces, they are shown just for ease of reading. > > Frequency, Sec1, Sec2, Sec3...Sec600 > 1e8, -95, -90, -92 > 1.1e8, -100, -101, -103 > ... > > The data represents 600 seconds of fft data. I would like the plot to look > something like the attached image. The x axis should be the columns of data > (time), the y axis should be each row (frequency). The z axis is intensity > and I'm hoping can be displayed both in height as well as color. General solution (no matrix treatment): set datafile separator "," set autotitle columnheader # read a row of titles unset key # but don't use it for anything set grid x y z set hidden3d splot for [sec=1:600] 1:(sec):(column(sec+1)) with impulse lc palette You may want to adjust the linewidth of the impulses, the palette coloring scheme, etc. There's probably a way to read it as a matrix also, but I'm less sure of the syntax off the top of my head. Ethan > I can control the input data if needed to remove the first column, but then > I would need to be able to specify the start/ stop range of the labels > > <http://gnuplot.10905.n7.nabble.com/file/n17268/test.png> > > > > -- > View this message in context: http://gnuplot.10905.n7.nabble.com/Waterfall-Cascade-Plot-tp17268.html > Sent from the Gnuplot - User mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > -- Tradition is not the worship of ashes, but the preservation of fire. - Gustav Mahler |
|
From: Ethan A M. <EAM...@gm...> - 2013-04-12 02:28:14
|
On Thursday, 11 April 2013, Ethan A Merritt wrote: > On Thursday, 11 April 2013, howudodat wrote: > > I am trying to make a waterfall / cascade plot of csv data. The data is > > 8192 rows of data x 600 columns of time. The first column is a frequency > > label, the first row is shown below but doesn't actually exist in the data > > file, neither do the spaces, they are shown just for ease of reading. > > > > Frequency, Sec1, Sec2, Sec3...Sec600 > > 1e8, -95, -90, -92 > > 1.1e8, -100, -101, -103 > > ... > > > > The data represents 600 seconds of fft data. I would like the plot to look > > something like the attached image. The x axis should be the columns of data > > (time), the y axis should be each row (frequency). The z axis is intensity > > and I'm hoping can be displayed both in height as well as color. > > General solution (no matrix treatment): > > set datafile separator "," > set autotitle columnheader # read a row of titles Oops. Make that set key autotitle columnheader Ethan > unset key # but don't use it for anything > set grid x y z > set hidden3d > splot for [sec=1:600] 1:(sec):(column(sec+1)) with impulse lc palette > > You may want to adjust the linewidth of the impulses, > the palette coloring scheme, etc. > > There's probably a way to read it as a matrix also, > but I'm less sure of the syntax off the top of my head. > > > > Ethan > > > > I can control the input data if needed to remove the first column, but then > > I would need to be able to specify the start/ stop range of the labels > > > > <http://gnuplot.10905.n7.nabble.com/file/n17268/test.png> > > > > > > > > -- > > View this message in context: http://gnuplot.10905.n7.nabble.com/Waterfall-Cascade-Plot-tp17268.html > > Sent from the Gnuplot - User mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > gnuplot-info mailing list > > gnu...@li... > > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > > > > -- Tradition is not the worship of ashes, but the preservation of fire. - Gustav Mahler |
|
From: howudodat <pe...@ho...> - 2013-04-12 13:57:50
|
I have used the following commands ( I didn't use the autotitle because the
first row doesn't actually exist in the data file):
gnuplot> set datafile separator ","
gnuplot> set grid x y z
gnuplot> set hidden3d
gnuplot> splot for [sec=1:600] 1:(sec):(column(sec+1)) 'wf.csv' with impulse
lc palette
Warning: empty z range [1:1], adjusting to [0.99:1.01]
gnuplot> splot for [sec=1:600] 1:(sec):(column(sec+1)) 'wf.csv' with impulse
lc palette
^
';' expected
gnuplot>
and the resulting image is:
<http://gnuplot.10905.n7.nabble.com/file/n17271/chart1.png>
--
View this message in context: http://gnuplot.10905.n7.nabble.com/Waterfall-Cascade-Plot-tp17268p17271.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: walter h. <wh...@bf...> - 2013-04-12 15:36:53
|
Am 12.04.2013 15:57, schrieb howudodat: > I have used the following commands ( I didn't use the autotitle because the > first row doesn't actually exist in the data file): > gnuplot> set datafile separator "," > gnuplot> set grid x y z > gnuplot> set hidden3d > gnuplot> splot for [sec=1:600] 1:(sec):(column(sec+1)) 'wf.csv' with impulse > lc palette > Warning: empty z range [1:1], adjusting to [0.99:1.01] > > > gnuplot> splot for [sec=1:600] 1:(sec):(column(sec+1)) 'wf.csv' with impulse > lc palette > ^ > ';' expected > > gnuplot> > > and the resulting image is: > <http://gnuplot.10905.n7.nabble.com/file/n17271/chart1.png> > i am not sure but maybe this can help you. i use gnuplot to visualize spectra. they are organized like value|value|value|.... all rows are the same length. my gnuplot file look like that: set view map set datafile separator "|" set palette rgbformulae 22,13,-31 unset ytics set xrange [0:500] set yrange [*:*] set cbrange [0:100] splot "coinz" matrix with image |
|
From: Peter C. <pe...@ho...> - 2013-04-12 16:03:51
|
I tried that and end up getting no data to show up in the plot (and it
appears to be 2d)
gnuplot> set view map
gnuplot> set datafile separator ","
gnuplot> unset ytics
gnuplot> set xrange[1:600]
gnuplot> set yrange[*:*]
gnuplot> set cbrange [-200:0]
gnuplot> splot 'wf.csv' matrix with image
GNUPLOT (plot_image): Image grid must be at least 2 x 2.
And a flat 2d image was shown with no data plotted
tried again with:
gnuplot> set yrange[1:8192]
gnuplot> splot 'wf.csv' matrix with image
warning: No usable data in this plot to auto-scale axis range
z axis range undefined or overflow
Peter
On 4/12/2013 8:16 AM, walter harms wrote:
> i am not sure but maybe this can help you.
> i use gnuplot to visualize spectra. they are organized
> like value|value|value|.... all rows are the same length.
> my gnuplot file look like that:
>
> set view map
> set datafile separator "|"
> set palette rgbformulae 22,13,-31
> unset ytics
> set xrange [0:500]
> set yrange [*:*]
> set cbrange [0:100]
> splot "coinz" matrix with image
>
>
|
|
From: Ethan A M. <EAM...@gm...> - 2013-04-12 15:13:08
|
On Friday, 12 April 2013, howudodat wrote: > I have used the following commands ( I didn't use the autotitle because the > first row doesn't actually exist in the data file): > gnuplot> set datafile separator "," > gnuplot> set grid x y z > gnuplot> set hidden3d > gnuplot> splot for [sec=1:600] 1:(sec):(column(sec+1)) 'wf.csv' with impulse > lc palette > Warning: empty z range [1:1], adjusting to [0.99:1.01] > > > gnuplot> splot for [sec=1:600] 1:(sec):(column(sec+1)) 'wf.csv' with impulse > lc palette > ^ > ';' expected Sorry, sorry. I don't know what I was thinking of. Here it is again, tested on some actual data this time: splot for [sec=1:600] 'wf.csv' using 1:(sec):(column(sec+1)) with impulse lc palette Ethan -- Tradition is not the worship of ashes, but the preservation of fire. - Gustav Mahler |
|
From: howudodat <pe...@ho...> - 2013-04-12 15:31:44
|
I think I might be missing a range, but not sure where to put it, here is
what I get now:
gnuplot> splot for [sec=1:600] 'wf.csv' using 1:(sec):(column(sec+1)) with
impulse lc palette
warning: No usable data in this plot to auto-scale axis range
repeats (I'm guessing 8192 times)
All points x value undefined
My x range should be from 135000000 to 160000000
My y range should be from 1 to 600
My z range should be around -120 to -60
Peter
--
View this message in context: http://gnuplot.10905.n7.nabble.com/Waterfall-Cascade-Plot-tp17268p17273.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: howudodat <pe...@ho...> - 2013-04-12 15:56:21
|
Also, I have posted one of the source data files at http://www.earthbest.com/wf.csv.zip Peter -- View this message in context: http://gnuplot.10905.n7.nabble.com/Waterfall-Cascade-Plot-tp17268p17275.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Thor A. <ta...@to...> - 2013-04-15 11:10:07
|
On Fri, Apr 12, 2013 at 08:56:12AM -0700, howudodat wrote: > Also, I have posted one of the source data files at > http://www.earthbest.com/wf.csv.zip According to 'help plot matrix' your data format is in an in-between state, i.e. it is uniform but includes frequency in the first column. So in order to plot it, you need to do a little pre-processing. To convert the data to a uniform format the first column should be removed, this can be done by a program called 'cut': -- >8 -- set datafile separator comma set view map splot '< cut -d, -f2- wf.csv' matrix with image -- >8 -- I've used 'map' and 'with image' because these use less memory. It's bit more involved, but you can also convert the data to the non-uniform format by adding the y-values as the first row, the sequence can be generated by 'seq': -- >8 -- set datafile separator comma set view map splot '< seq -s, 602; cat wf.csv' nonuniform matrix with image -- >8 -- -- best regards Thor Andreassen |
|
From: howudodat <pe...@ho...> - 2013-04-15 20:53:18
|
I wanted to bring everyone up to the most current code I am working with and what's left for me to figure out. I have only one remaining issue: My data file does not have a first line as x axis tics. Our raw data file will /normally / look like: 1.3e8, -95, -110, -105.... 1.4ee8, -97- -103, -102... ... with there being 601 columns of Z data (time) by 8192 rows of frequencies. In order for the below script to work, I had to */insert /* a row of ,1,2,3,4 I'd like to not insert that row into our raw data if possible. I am now plotting with: gnuplot -e"filename=SOURCE" plot.plg and it reads SOURCE.csv and outputs to SOURCE.png and SOUCE-sub.png #common parameters for both plots set term png size 1900,1080 set datafile separator "," set pm3d set xrange[*:*] reverse set key autotitle columnhead set hidden3d set view 45,75,,0.85 set palette defined (-120 "yellow", -70 "red", -30 "blue") set xtics 0,50,600 set grid x y z # plot all the data set output filename.'.png' splot filename.'.csv' nonuniform matrix using 1:2:3 with pm3d lc palette # plot only what we are looking for +- a bit set output filename.'-sub.png' sedcmd="<(sed -n '1p;1000,3000p' " .filename. ".csv)" splot sedcmd nonuniform matrix using 1:2:3 with pm3d lc palette exit -- View this message in context: http://gnuplot.10905.n7.nabble.com/Waterfall-Cascade-Plot-tp17268p17286.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |