Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GNUPLOT on Mac "x11 aborted"

To install gnuplot with x11, I used the following command:

brew install gnuplot --with-x11

I am running OS X EL Capitan Version 10.11.6. When I run gnuplot, I obtain:

    G N U P L O T   Version 5.0 patchlevel 5    last modified 2016-10-02

    Copyright (C) 1986-1993, 1998, 2004, 2007-2016  Thomas Williams, Colin Kelley and many others

    gnuplot home:     http://www.gnuplot.info   faq, bugs, etc:   type "help FAQ"   immediate help:   type "help"  (plot window: hit 'h')

Terminal type set to 'unknown'

I then tried to plot something simple like sin(x) and I get the error

gnuplot: unable to open display ''
gnuplot: X11 aborted.

Any advice?

like image 323
user5965026 Avatar asked Jan 28 '26 23:01

user5965026


1 Answers

First of all, if you haven't yet, you have to type the command

set term x11

this is fundamental, because without having set a term you can't have an output. Then, if it's still not working, try uninstalling gnuplot and reinstall with another terminal, e.g. the qt terminal (which is good also because if you have a 3D plot you can interact with it), by using the command

 brew uninstall gnuplot
 brew install gnuplot --with-qt

Alternatively, if you really need x11 as terminal you can have a look here on AskDifferent (seem someone has already had a similar issue).

Also, typing set term could be helpful and give you the entire list of gnuplot terminal pre-installed, and remember, if you have a question check before the GNUPLOT guide, which is accessible with the command help "ANYTHING_INSIDE_GNUPLOT", in your case:

help term
like image 121
opisthofulax Avatar answered Jan 31 '26 18:01

opisthofulax



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!