Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gnuplot cblabel not appearing

Tags:

gnuplot

I am trying to plot a function of two variables represented in tabular form. I would like to label my color bar while representing this as a heatmap. No matter how much I rescale, no luck, and I don't even see the colorbar label appearing. Here is my gnuplot script:

set title "Flux in core vs radius and height"
set view map
set cblabel "Neutron flux (cm^-2 s^-1)"
set xlabel "Radius (cm)"
set ylabel "Axial distance from center (cm)"
splot "flux.out" using 1:2:3 with image

And the result looks like this, lacking a colorbar label:

Plot without colorbar

like image 284
Gavin Ridley Avatar asked Jul 05 '26 18:07

Gavin Ridley


1 Answers

The cblabel is printed outside the picture. You can manually adjust the margins to make some space for the label:

set lmargin at screen 0.1
set rmargin at screen 0.7

I used at screen because else the picture would be cropped again. And I also set lmargin because else in my test the ylabel would not fit on the page.

Tested with Gnuplot 4.6.

like image 52
maij Avatar answered Jul 09 '26 19:07

maij



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!