Suppose that I know to generate several 2D-heatmaps, say 3 of them ( each map is a 2D representation with a color code coding the itnensity of a third-variable) from differnt files. I would like to assemble these maps into a cube. For illustrative exemple, see the Fig.2 of the following .pdf article, page 7.
This does not seem difficult. What have you tried that didn't work?
See for example the last plot in the image2 demo, where a 2D image is plotted in two different planes in 3D http://gnuplot.sourceforge.net/demo_cvs/image2.html
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thx for the help, appreciated. First, I don't use with image to generate my heatmaps (not supported on my mac for some reasons). I tried the following (following the link provided above) without being succesfull:
--
unset border
unset key
set view 60, 45, 1, 1
unset xtics
unset ytics
unset ztics
set lmargin 0
set bmargin 0
set rmargin 0
set tmargin 0
unset colorbox
set view map
splot 'data.txt' u 2:1:3 with point palette pointsize 1 pointtype 5 origin=(0,0,0) perp = (1,0,0),'data.txt' u 2:1:3 with point palette pointsize 1 pointtype 5 origin=(0,0,0) perp = (1,0,0)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK. So create the 3 heatmaps you want to place on the cube faces. Write each one to a file (probably PNG). Then read in the 3 PNG files using "with image" and position them as desired in 3D.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Minimal example.
Does not use PNG files for intermediate storage of heat maps
Requires verion 5.2.2, earlier version will not accept the sampling directive
set xyplane at 0
set style data pm3d
set pm3d depthorder
#
splot sample [u=0:10:1][v=0:10:1] '++' using (u):(0):(v):(u*v), \
[u=0:10:1][v=0:10:1] '++' using (u):(v):(0):(u*v), \
[u=0:10:1][v=0:10:1] '++' using (0):(u):(v):(u*v)
Dear community,
Suppose that I know to generate several 2D-heatmaps, say 3 of them ( each map is a 2D representation with a color code coding the itnensity of a third-variable) from differnt files. I would like to assemble these maps into a cube. For illustrative exemple, see the Fig.2 of the following .pdf article, page 7.
Best regards,
Last edit: Jerome 2017-12-10
Hi guys,
I'm afraid. Any ideas?
Regards
This does not seem difficult. What have you tried that didn't work?
See for example the last plot in the image2 demo, where a 2D image is plotted in two different planes in 3D
http://gnuplot.sourceforge.net/demo_cvs/image2.html
Thx for the help, appreciated. First, I don't use with image to generate my heatmaps (not supported on my mac for some reasons). I tried the following (following the link provided above) without being succesfull:
--
unset border
unset key
set view 60, 45, 1, 1
unset xtics
unset ytics
unset ztics
set lmargin 0
set bmargin 0
set rmargin 0
set tmargin 0
unset colorbox
set view map
splot 'data.txt' u 2:1:3 with point palette pointsize 1 pointtype 5 origin=(0,0,0) perp = (1,0,0),'data.txt' u 2:1:3 with point palette pointsize 1 pointtype 5 origin=(0,0,0) perp = (1,0,0)
Are you sure? "with image" has been a supported plot mode on all platforms since about 2006 (version 4.2). How old is your gnuplot version?
Yes I'am. That's why I'm using the aformentioned method (with point palette)
G N U P L O T
Version 5.2 patchlevel 2
OK. So create the 3 heatmaps you want to place on the cube faces. Write each one to a file (probably PNG). Then read in the 3 PNG files using "with image" and position them as desired in 3D.
thx but it's not that clear. Do you have a minimal reproducible example?
cheers,
Minimal example.
Does not use PNG files for intermediate storage of heat maps
Requires verion 5.2.2, earlier version will not accept the sampling directive
Last edit: Ethan Merritt 2018-01-16