presto icon indicating copy to clipboard operation
presto copied to clipboard

Unrecognized device type

Open Toexplore opened this issue 3 years ago • 1 comments

Hi I have installed PRESTO, but the following error always occur (exploredat & explorefft)

%PGPLOT, Unrecognized device type
%PGPLOT, Invalid device specification: /XWIN

PS: No matter what the value of $PGPLOT_DEV is, the error is the same

The following code( in exploredat.c & explorefft.c) is confusing to me. If we fail to open /XWIN, then exit without opening other devices which specified in the $env files?

 /* Prep the XWIN device for PGPLOT */

    xid = cpgopen("/XWIN");
    if (xid <= 0) {
        free_datapart(lodp);
#ifdef USEMMAP
        close(mmap_file);
#else
        fclose(datfile);
#endif
        free(dv);
        exit(EXIT_FAILURE);
    }

There is also a similar issue:https://github.com/scottransom/presto/issues/48

Toexplore avatar Jul 03 '21 08:07 Toexplore

So as mentioned at the end of issue #48, this seems like your PGPLOT library isn't compiled with x-windows support. That is required for exporedat and explorefft since those are interactive programs. So the two things to check are: is the PGPLOT_DIR environment variable pointing to the directory where, for example grfont.dat and rgb.txt can be found? And second, especially if you compiled PGPLOT on your own, did you enable the XWIN driver in the configuration file? I'd highly recommend that you install a pre-built package for PGPLOT, as compiling it properly can be tricky!

scottransom avatar Jul 03 '21 14:07 scottransom