Return to site

Gnuplot For Mac Install

broken image


However, the MacPorts package manager has a usable install for gnuplot (it's safe to have both Brew and MacPorts installed). After intalling AquaTerm, I used the following to install gnuplot, and all is working as expected: sudo port install gnuplot +aquaterm. Install Xcode via the Mac App Store. Install the Command Line Tools by opening a terminal and type sudo xcode-select -install. Octave has a built-in GUI (developed using Qt lib) installed by default so that gnuplot and other tools can use it directly. This GUI is always installed when installing.

A quick—and popular, if Google is to be believed—guide to installing gnuplot on macOS.

Hardly anyone has gone through a college mathematics or physics course without meeting the wonderful gnuplot. However, it turns out that installing gnuplot (or Octave, for that matter — but let us leave that for another day) on a Mac is a pain in the neck. At a time when installing games take a two clicks, it simply is not straightforward to install gnuplot.

After scratching my head over it for two days straight, I finally installed gcc, gnuplot, Octave and LaTeX on my new Mac (OS X 10.10.3, Yosemite) and decided to note some points/instructions down here for anyone else looking for a simple solution from start to finish contained in one place.

Update, 6 December 2019 Since this article was written about five years ago Homebrew has changed its gnuplot installation system and does not allow picking terminals. This makes this a little inconvenient, not to mention useless. Thankfully MacPorts still supports a robust full gnuplot installation which makes me change my recommendation from ‘always install Homebrew' to ‘always install both Homebrew and MacPorts'. Install MacPorts by picking a suitable package on their installation page. Then proceed as follows:

  1. Check what terminals are available (optional) with sudo port variant gnuplot
  2. Install gnuplot with required terminals e.g. sudo port install gnuplot +qt5 + x11 +aquaterm +wxwidgets will install gnuplot with QT5, x11, AquaTerm and WXT.

Click here to skip older updates and go to the main (legacy) article which runs you through XCode, GCC etc. Specifically, the above two steps replace steps 7 and 8 in the main article below.

Update, 9 August 2017 Since this article was written about two years ago a new version of gnuplot has been released, as have two new versions of macOS. A couple of my views have also changed as a result of this: I think AquaTerm is good enough for gnuplot and the decision to use X11 should only be a matter of specific needs or taste.

This article has turned out to be more popular than I hoped, with several universities and academic institutions sending lots of traffic towards it, all the way from these interesting lecture notes from Stony Brook University, NY, to this Chinese (I think) forum. In view of public demand, below is a small update.

If all you are interested in doing is to install gnuplot save yourself the trouble of scrolling down and follow these instructions (tested on macOS High Sierra) to install both AquaTerm and X11, omitting commands as necessary if you only wish to use one and not the other.

  1. Install homebrew via the Terminal with /usr/bin/ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)' Onn optical mouse driver windows 10.

  2. Install xquartz if you want X11 brew cask install xquartz

  3. Install aqua if you want AquaTerm brew install Caskroom/cask/aquaterm

  4. Install gnuplot (remove the --with-name for terminals you do not need brew install gnuplot --with-aquaterm --with-qt4 --with-x11

That is all. Enjoy plotting with gnuplot.

If you have been trying to dodge your way out of Apple's enormous 2.6GB Xcode app, get ready to face the demon: almost nothing related to coding will work on your Mac without Xcode and its libraries, so head to the App store and download Xcode.

Download command line tools for Xcode. You can do this via the Terminal.app (Applications → Utilities → Terminal) with the following command (which you may copy and paste):xcode-select --install

This gives you a message saying command line tools have not been installed and will offer to install them for you now; proceed and install them. It should take some time, though not as much as downloading Xcode.

You need to have accepted the Xcode licence agreements to use many related programmes, so open Terminal and type in the following (you can copy and paste it as usual):

sudo xcodebuild

This gives you a message requiring you to press return/enter to view the license. Hit enter, read through it and type in agree at the end when prompted. Type in cancel to disagree, meaning you should probably have been reading some other article now, not this. In any case, once you read and agree, proceed to the next step.

GCC should work straight after installing Xcode. Open Terminal and do the following:

vi Hello.c

In the page that opens, copy and paste these lines: Epson t50 driver for mac.

Then press Esc and type :wq and you will return to the first Terminal screen. There, type the following two lines (press Return after each line):

gcc Hello.c -o Hello

./Hello

You should get an output on screen saying ‘Hello, world.' if all is well. And that is all for GCC, which is actually simple, unlike gnuplot and Octave.

MacTeX is LaTeX for Mac. For basic — and mostly all general purposes — I did not see the need to install the entire MacTeX package, which is 2.5GB in size. As an alternative, I opted for the smaller, yet feature-rich, BasicTeX package which I usually install on all my systems.

You can go with the full package or opt for the smaller one as per your needs. Both files are .pkg and involve the usual GUI installation so this step should be no problem for anyone.

Mac

XQuartz, or colloquially the X11.app, is a Mac version of Windows' X Server. It is necessary for Homebrew, which we will install next, as well as to use the (somewhat) standard xterm display in gnuplot. Download XQuartz, which comes as a disk image which you can easily mount and install via a package.

The catch here is that the installed X11.app (check Applications → Utilities → X11 after installing) must be started before the Terminal is fired up to run gnuplot. That is the only way to make gnuplot start with the x11 terminal by default. If you find gnuplot aborting, you have probably not started x11.

Since Macs do not come with a package manager built-in like Linux, you will have to opt for alternatives often developed by the community. While MacPorts has been a popular one, I have found it buggy, especially so with xterm (x11) display for gnuplot, which is both the standard and more convenient than Aqua, the default for Mac — do not ask me why.

Installing Homebrew, an increasingly more preferred MacPorts alternative for good reasons, is simple. Open Terminal and use the command given below:

ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'

This should install Homebrew without a problem. Homebrew commands begin with brew and are fairly easy to follow.

Installing gnuplot once you have come this far, thankfully, is fairly simple:

brew install gnuplot --with-x11

Remember to specify --with-x11 instead of the older (now deprecated) --x11 or brew install gnuplot without x11.

Now it is time to check gnuplot. Fire up gnuplot:

gnuplot

Then type in a simple plotting command and hit return/enter.

plot sin(x)

This should immediately display a generic sine graph (not saved permanently anywhere, of course) on your screen.

How to save and use plots is beyond the scope of this article, but for now, if you find the output graph giving out an error, make sure you have the x11.app running before you open Terminal.

Hat tip to Michael Budd After writing this article, I came across Michael Budd's on installing gnuplot straight from the source files. I tried in vain to get x11 to work well after installing in this method, but perhaps I was not good enough in trying. That said, if you are not particular about x11, this is a really quick method to get gnuplot to work.

Note that when trying the third make install command, it failed on my system several times, so I had to work around that using sudo make install and entering my administrator password. If you do not have, administrator rights Mr Budd's method may not work.

Gnuplot Mac Os

Some machines may still have problems with gnuplot, in which case you could try editing your bash profile. Please try this at your own risk, and if you have no idea what this does, I strongly insist that you do not do it. In any case, I cannot be held responsible for whatever happens to your system.

touch ~/.bash_profile; open ~/.bash_profile

Enter the above command in your Terminal to open your .bash_profile for editing in TextEdit (or whatever else is your default editor). Next, in the open file, type the following and hit +S to save it, then close it.

if [ -z ${DISPLAY} ] then export DISPLAY=:0.0 fi

Restart Terminal and it should work fine now. This has something to do with gnuplot sending data to the wrong display. You can find more details and a fair bit of discussion on this around the web.

That should be all. You should have a working copy of gnuplot on your machine now. Have fun with it: it supports eps export as well as links to c programmes via the pfile command. So far, in my use, I have not come across any problems after installing it this way, but if you do, let me know and I will try to help you as best as I can.

Unlike the software developed for Windows system, most of the applications installed in Mac OS X generally can be removed with relative ease. gnuplot 5.0.3 is a third party application that provides additional functionality to OS X system and enjoys a popularity among Mac users. However, instead of installing it by dragging its icon to the Application folder, uninstalling gnuplot 5.0.3 may need you to do more than a simple drag-and-drop to the Trash.

Download Mac App Remover

When installed, gnuplot 5.0.3 creates files in several locations. Generally, its additional files, such as preference files and application support files, still remains on the hard drive after you delete gnuplot 5.0.3 from the Application folder, in case that the next time you decide to reinstall it, the settings of this program still be kept. But if you are trying to uninstall gnuplot 5.0.3 in full and free up your disk space, removing all its components is highly necessary. Continue reading this article to learn about the proper methods for uninstalling gnuplot 5.0.3.

Manually uninstall gnuplot 5.0.3 step by step:

Most applications in Mac OS X are bundles that contain all, or at least most, of the files needed to run the application, that is to say, they are self-contained. Thus, different from the program uninstall method of using the control panel in Windows, Mac users can easily drag any unwanted application to the Trash and then the removal process is started. Despite that, you should also be aware that removing an unbundled application by moving it into the Trash leave behind some of its components on your Mac. To fully get rid of gnuplot 5.0.3 from your Mac, you can manually follow these steps:

Gnuplot Mac Install Command

1. Terminate gnuplot 5.0.3 process(es) via Activity Monitor

Before uninstalling gnuplot 5.0.3, you'd better quit this application and end all its processes. If gnuplot 5.0.3 is frozen, you can press Cmd +Opt + Esc, select gnuplot 5.0.3 in the pop-up windows and click Force Quit to quit this program (this shortcut for force quit works for the application that appears but not for its hidden processes).

Gnuplot Auf Mac Installieren

Open Activity Monitor in the Utilities folder in Launchpad, and select All Processes on the drop-down menu at the top of the window. Select the process(es) associated with gnuplot 5.0.3 in the list, click Quit Process icon in the left corner of the window, and click Quit in the pop-up dialog box (if that doesn't work, then try Force Quit).

2. Delete gnuplot 5.0.3 application using the Trash

First of all, make sure to log into your Mac with an administrator account, or you will be asked for a password when you try to delete something.

Open the Applications folder in the Finder (if it doesn't appear in the sidebar, go to the Menu Bar, open the 'Go' menu, and select Applications in the list), search for gnuplot 5.0.3 application by typing its name in the search field, and then drag it to the Trash (in the dock) to begin the uninstall process. Alternatively you can also click on the gnuplot 5.0.3 icon/folder and move it to the Trash by pressing Cmd + Del or choosing the File and Move to Trash commands.

For the applications that are installed from the App Store, you can simply go to the Launchpad, search for the application, click and hold its icon with your mouse button (or hold down the Option key), then the icon will wiggle and show the 'X' in its left upper corner. Click the 'X' and click Delete in the confirmation dialog.

Download Mac App Remover
3. Remove all components related to gnuplot 5.0.3 in Finder

Though gnuplot 5.0.3 has been deleted to the Trash, its lingering files, logs, caches and other miscellaneous contents may stay on the hard disk. For complete removal of gnuplot 5.0.3, you can manually detect and clean out all components associated with this application. You can search for the relevant names using Spotlight. Those preference files of gnuplot 5.0.3 can be found in the Preferences folder within your user's library folder (~/Library/Preferences) or the system-wide Library located at the root of the system volume (/Library/Preferences/), while the support files are located in '~/Library/Application Support/' or '/Library/Application Support/'.

Open the Finder, go to the Menu Bar, open the 'Go' menu, select the entry:|Go to Folder.. and then enter the path of the Application Support folder:~/Library

Search for any files or folders with the program's name or developer's name in the ~/Library/Preferences/, ~/Library/Application Support/ and ~/Library/Caches/ folders. Right click on those items and click Move to Trash to delete them.

Meanwhile, search for the following locations to delete associated items:

  • /Library/Preferences/
  • /Library/Application Support/
  • /Library/Caches/

Besides, there may be some kernel extensions or hidden files that are not obvious to find. In that case, you can do a Google search about the components for gnuplot 5.0.3. Usually kernel extensions are located in in /System/Library/Extensions and end with the extension .kext, while hidden files are mostly located in your home folder. You can use Terminal (inside Applications/Utilities) to list the contents of the directory in question and delete the offending item.

4. Empty the Trash to fully remove gnuplot 5.0.3

If you are determined to delete gnuplot 5.0.3 permanently, the last thing you need to do is emptying the Trash. To completely empty your trash can, you can right click on the Trash in the dock and choose Empty Trash, or simply choose Empty Trash under the Finder menu (Notice: you can not undo this act, so make sure that you haven't mistakenly deleted anything before doing this act. If you change your mind, before emptying the Trash, you can right click on the items in the Trash and choose Put Back in the list). In case you cannot empty the Trash, reboot your Mac.

Download Mac App Remover

Tips for the app with default uninstall utility:

You may not notice that, there are a few of Mac applications that come with dedicated uninstallation programs. Though the method mentioned above can solve the most app uninstall problems, you can still go for its installation disk or the application folder or package to check if the app has its own uninstaller first. If so, just run such an app and follow the prompts to uninstall properly. After that, search for related files to make sure if the app and its additional files are fully deleted from your Mac.

Automatically uninstall gnuplot 5.0.3 with MacRemover (recommended):

No doubt that uninstalling programs in Mac system has been much simpler than in Windows system. But it still may seem a little tedious and time-consuming for those OS X beginners to manually remove gnuplot 5.0.3 and totally clean out all its remnants. Why not try an easier and faster way to thoroughly remove it?

If you intend to save your time and energy in uninstalling gnuplot 5.0.3, or you encounter some specific problems in deleting it to the Trash, or even you are not sure which files or folders belong to gnuplot 5.0.3, you can turn to a professional third-party uninstaller to resolve troubles. Here MacRemover is recommended for you to accomplish gnuplot 5.0.3 uninstall within three simple steps. MacRemover is a lite but powerful uninstaller utility that helps you thoroughly remove unwanted, corrupted or incompatible apps from your Mac. Now let's see how it works to complete gnuplot 5.0.3 removal task.

1. Download MacRemover and install it by dragging its icon to the application folder.
2. Launch MacRemover in the dock or Launchpad, select gnuplot 5.0.3 appearing on the interface, and click Run Analysis button to proceed.
3. Review gnuplot 5.0.3 files or folders, click Complete Uninstall button and then click Yes in the pup-up dialog box to confirm gnuplot 5.0.3 removal.

The whole uninstall process may takes even less than one minute to finish, and then all items associated with gnuplot 5.0.3 has been successfully removed from your Mac!

Benefits of using MacRemover:

MacRemover has a friendly and simply interface and even the first-time users can easily operate any unwanted program uninstallation. With its unique Smart Analytic System, MacRemover is capable of quickly locating every associated components of gnuplot 5.0.3 and safely deleting them within a few clicks. Thoroughly uninstalling gnuplot 5.0.3 from your mac with MacRemover becomes incredibly straightforward and speedy, right? You don't need to check the Library or manually remove its additional files. Actually, all you need to do is a select-and-delete move. As MacRemover comes in handy to all those who want to get rid of any unwanted programs without any hassle, you're welcome to download it and enjoy the excellent user experience right now!

This article provides you two methods (both manually and automatically) to properly and quickly uninstall gnuplot 5.0.3, and either of them works for most of the apps on your Mac. If you confront any difficulty in uninstalling any unwanted application/software, don't hesitate to apply this automatic tool and resolve your troubles.

Gnuplot Linux

Download Mac App Remover



broken image