You should now be able to build and run examples/plot.hs, and see three nicely anti-aliased plots. If Aquaterm fails to compile, upgrade to the latest version of XCode. To build an example program using GHC, type: On Mac OS X Yosemite and above, vecLib is now called Accelerate. To load hmatrix using GHCI, you need to add the directory containing the gsl shared library to your LD_LIBRARY_PATH:Įxport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/lib You might also have to edit cc-options and ld-options to look in your ports directory: Next, edit hmatrix.cabal to refer to the appropriate versions of BLAS and LAPACK: You can also download it from the darcs repository as follows: The most recent version of hmatrix is available on HackageDB. Did find: /opt/local/lib/libgsl.dylib: mach-o, but wrong architecture) so/.DLL for: gsl (dlopen(/opt/local/lib/libgsl.dylib, 9): Otherwise you'll get the following error when you try to use hmatrix: Sudo port upgrade -enforce-variants gsl universal If you're using the 32-bit Haskell Platform and your MacPorts installation defaults to 64-bit binaries you want MacPorts to build universal binaries of gsl using: They appear to work fine with hmatrix, though I didn't test very much. LAPACK, however, is already installed on MacOS X 10.4/10.5, namely in the vecLib (10.4) or Accelerate (10.5) frameworks. You can get GSL and BLAS from DarwinPorts: The hmatrix package requires working versions of GSL, BLAS and LAPACK. This may take several hours to bootstrap on a slow machine. ![]() No sure why? Assuming that you have uninstalled any other versions of ghc, type: Is called from plot.First, you will want to install GHC using MacPorts, not the standalone installers. Do not use directly.Ĭreates a temporary file to feed to gnuplot with the data. This is called from *initClass.Ĭonverts an envelope into a plottable format for GNUPlotįolder for temporary files (default SC_to_GNUPlot in the working directory) Private methods and variables ![]() G.plot3(.surf3(Rect(0,0,2,2))Ĭreates the folder for the temporary files. Maximum bin value for the histogram - 3D and scatter. The number of bins to use in the histogram Whether or not to use verbosity while creating the histogram. This method pipes the data directly to GNUPlot, without using a temporary file. Plots the data in a histogram, assuming ns rows, and using the label. Sets and unsets the multiplot option in GNUPlot. The optional "term" argument can be used to set a different output type (such as "png" or "eps"), depending on the output types supported by your gnuplot installation. By default this attempts to write a PDF to the specified path. Plots the data, assuming ns rows, and using the label. plot several sets of data in one figure: Each row will be plotted as a separate graph line. This method uses a temporary file to pass on the data to GNUPlot. Since GNUPlot is opened in "persist" mode, the window will not disappear, you will have to close it manually. (called automatically when creating a new instance.) GNUPlot.gnuplotpath = "/opt/local/bin/gnuplot" Accessing Instance and Class Variables GNUPlot.initCode = GNUPlot.initCode "\n set term x11 \n" If you want to send plots to X11 instead, run code similar to: GNUPlot can display its plots in various ways - this quark assumes that you want to plot in Aquaterm. gnuplot directly on an Env to plot it with this method ![]() using the Collection extensions you can also directly use gnuplot on the gnuplot directly on an ArrayedCollection to plot it with this method. You need to have GNUPlot installed in order to be able to use this class! Creation / Class Methods This class allows you to use the powerful plotting capabilities of GNUPlot from within SuperCollider. GNUPlot class to interface GNUPlot from SuperCollider
0 Comments
Leave a Reply. |