Search code examples
gnuplot

Unable to produce a colour map from a data


I have been trying to plot some colour maps from a data I found online to test the colour map tool but there seems to be an issue with gnuplot. I did blanked line every time the x value changed. The code is as below

set size 1,1; set origin 0,0
set grid layerdefault
set xlabel "x (rdaius)"
set ylabel "z (radius)"

set sample 11; set isosamples 11
set pm3d map
set palette
set colorbox
set lmargin 0


set pm3d flush begin
splot '1.dat' using 1:2:3 

The 1.dat file is attached 1.dat file

When running the code I get the following error;

failed to get the current screen resources
QXcbConnection: XCB error: 172 (Unknown), sequence: 169, resource id: 146, major code: 149 (Unknown), minor code: 20
No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(SingleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile))
Falling back to using screens root_visual.

Can someone clarify what I am doing wrong?

Thanks,


Solution

  • The error message is being reported by gnuplot's qt terminal driver, so one thing you can do immediately is to set gnuplot to default to some terminal other than qt. For example

    bash$   export GNUTERM=wxt
    

    However the cause of the error is not in gnuplot. Hunting the web for other reports of that error message turns up hints that it may be related to incompatible versions of OpenGL/MESA and/or the nVidia driver. I suspect it can only be fixed by changing video drivers or installing a different set GL libraries.