Thursday, 19 January 2017

Gnuplot/C On A Mac

I recently updated my Mac to Big Sur and found the previous Gnuplot (http://gnuplot.info/) installation procedure using Homebrew is no longer the best method so I've updated this blog post.

First install Gnuplot on Big Sur:
If you have MacPorts (https://www.macports.org/) installed then update it:
    sudo port -v selfupdate
If you do not have MacPorts installed then you can install it by opening the following URL:
Install gnuplot using MacPorts:
    sudo port install gnuplot +wxwidgets
(I like the wxwidgets API)

Perfect, lets test gnuplot :

$ gnuplot
gnuplot> plot sin(x)

We should now see a nice little sinusoid graph.

Now let's build Gnuplot/C :
$ cd gnuplot_c/src/
$ make -f makefile.macos

Now let's test Gnuplot/C :
$ cd gnuplot_c/examples/
$ ./br.sh LinesAndPoints

We should now see the graphs plotted.

Note, if you see the following message:
sh: /dev/nul: Permission denied

Then you need to do the following:
$ sudo mknod /dev/nul c 1 3
$ sudo chmod 666 /dev/nul

Now let's test Gnuplot/C again:
$ ./br.sh LinesAndPoints

Excellent. All running nicely :-)

If you have found this solution useful then please do hit the Google (+1) button so that others may be able to find it as well.
Numerix-DSP Libraries : http://www.numerix-dsp.com/eval/

Copyright © 2017 Delta Numerix

No comments:

Post a Comment