|
#1
| |||
| |||
| Gnuplot And Xcode Has anyone got gnuplot to work successfully with Xcode? I've downloaded the gnuplot_i interface from Nick Devillard's website http://ndevilla.free.fr/gnuplot/index.html Using the example files and Xcode, a Carbon app builds successfully, but then will only open a results window Peter Watson |
|
#2
| |||
| |||
| This is an interesting question for all us science types that use macs to program. I will need to know how to do this myself in a few months but I haven't got a mac yet so I can't help you! If you have matlab, I guess you could call it's plotting functions from XCode? Matlab has C and C++ librarys of various functions, plot is one of them, I believe. If you find out how to do this please post or e-mail me, I'd be interested to find out. Best of luck, Dan. |
|
#3
| |||
| |||
| I've gotten gnuplot to work, but I'm not certain what you're asking when you refer to Xcode. I don't use gnuplot to debug software if this is the question. The link that you give points to GUI's for gnuplot. The simplest interface for 2D plots that I've found is octave. The plots are created using gnuplot and are displayed in aquaterm. |
|
#4
| |||
| |||
| Gnuplot & Xcode No: I'm not debugging code. I have a fairly lengthy calculation in C and would like to see intermediate results plotted out so that I know it is behaving as I expect. I can put the results in a text file and then use gnuplot (or several other programs suich as pro fit) to plot the data, but that is after the calculations have finished. Peter Watson |
|
#5
| |||
| |||
| sudo apt-get install gnuplot Then you can use gnuplot with either XDarwin, X11.app, or any GUI that you chose (I like octave). |
|
#6
| ||||
| ||||
| You need to install Aquaterm and then download GNUPlot, if you haven't already done so. Next, you need to create a symlink from /usr/local/bin/gnuplot to /usr/bin/gnuplot, unless you know how to add /usr/local/bin to the *entire* system path, not just from the terminal. If you don't want to create the symlinks, you can of course add /usr/local/bin to your PATH variable. You need to do this _outside_ the shell, so just editing .profile will _NOT_ work. This is important or you'll be pulling out hair for a long time. I did This can be done by creating a folder called .MacOSX in your home directory. Then create the file environment.plist and edit it in your favorite text editor to contain the following lines: Code: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.
com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GNUTERM</key>
<string>aqua</string>
<key>PATH</key>
<string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin</string>
</dict>
</plist> Enjoy GNUPlot from within Xcode :-) Last edited by Viro; August 15th, 2005 at 03:53 AM. |
|
#7
| |||
| |||
| Hi Viro. Weldone! I'll have a go at pulling those apps off when I get back to my broadband connection - I'm on damn dial up at the moment. When I was installing TexShop with TexLive I had the problem that 1) I couldn't see /usr and 2) not even from the terminal could I edit that folder? I ended up installing everything in ~/library . To enter that to the entire system path do you just have to mess around with unix's PATH environmental variable. Do you know enough about unix to explain the point in enviromental variables anf the PATH file? (And yes I took me a while to get texshop working before I figured out that I need to change them too!) |
|
#8
| ||||
| ||||
| The PATH environment variable is the path where the OS will know to look for executables. For example if you type in the command 'man', the OS will look through the paths on the PATH variable for the command man. This saves you from having to type out the entire path to the command. So in effect, the PATH variable acts as a kind of short-cut, storing the location of commonly used executables so you needed type in the full path when you call those executables. If you install additional software, it is usually recommended that you install them somewhere other than /usr/bin or /bin, since these are normally reserved for the system utilities. That is why TexShop installs teTeX in /usr/local/bin. If you installed teTeX via the i-Installer provided on the TexShop website, it will automatically update your PATHs for you. Now, for manually changing the PATH. All *nix OSes have funny places for storing allowing the user to edit the PATH. One place to set the PATH will be the file /etc/profile. Here, on most Unix systems the following line will do: Code: export PATH=/usr/bin:/bin:/usr/local/bin:/my/path/here:$PATH" ![]() Hope that helps you. |