This web log is my online notebook for software tips and hacks to make my life and hopefully that of someone else just a little bit easy. Should you find any mistakes or have any useful suggestions, please do not hesitate to write to me. Peace! Pavan Ghatty
Showing posts with label gnuplot. Show all posts
Showing posts with label gnuplot. Show all posts
Monday, December 9, 2013
Friday, March 15, 2013
Mapping 3d data on a 2d color map
Gnuplot has a very easy and straightforward way to convert a x-y-z data into a 3d plot or a 2d color map. Let's write the data in the form;
1 1 0.0
1 2 0.4451
1 3 0.4249
2 1 0.13142
2 2 0.0
2 3 0.983
3 1 xxx
3 2 xxx
3 3
A space between chunks of data is important. Using commands below you can get a 2d plot;
set size square
set pm3d map # Remove the word 'map' to get a 3d plot
set xrange [1:261] # Change the range to suit your needs
set yrange [1:261]
splot 'all.dat'
1 1 0.0
1 2 0.4451
1 3 0.4249
2 1 0.13142
2 2 0.0
2 3 0.983
3 1 xxx
3 2 xxx
3 3
A space between chunks of data is important. Using commands below you can get a 2d plot;
set size square
set pm3d map # Remove the word 'map' to get a 3d plot
set xrange [1:261] # Change the range to suit your needs
set yrange [1:261]
splot 'all.dat'
Subscribe to:
Posts (Atom)
