Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-10 Thread Dmitri O.Kondratiev
On Sat, Jun 4, 2011 at 1:56 AM, Ivan Lazar Miljenovic 
ivan.miljeno...@gmail.com wrote:

 On 4 June 2011 07:11, Dmitri O.Kondratiev doko...@gmail.com wrote:
  So, if I got this right,  I should run:
  'cabal install -fbuildExamples gnuplot'
  from gnuplot source root folder?

 You can either get the gnuplot tarball from Hackage, unpack it, and
 then within the directory do cabal install -fbuildExamples (assuming
 you want the examples).  Or else you can just do cabal install
 -fbuildExamples gnuplot from anywhere and cabal-install will download
 it, unpack it, build it, install it and then remove the unpacked
 tarball.


I got the gnuplot tarball from Hackage, unpacked it, and then within the
directory do cabal install -fbuildExamples.

That's what I get (see below). What else should I do to install gnuplot?

Thanks!

~/wks/haskell-wks/gnuplot/gnuplot-0.4.2/srcghc -v Demo.hs
Glasgow Haskell Compiler, Version 6.12.3, for Haskell 98, stage 2 booted by
GHC version 6.12.2
Using binary package database:
/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/package.conf.d/package.cache
Using binary package database:
/Users/user/.ghc/i386-darwin-6.12.3/package.conf.d/package.cache
hiding package Cabal-1.8.0.6 to avoid conflict with later version
Cabal-1.10.1.0
hiding package base-3.0.3.2 to avoid conflict with later version
base-4.2.0.2
wired-in package ghc-prim mapped to
ghc-prim-0.2.0.0-9df3bd825ad17ca739e158c880a25b11
wired-in package integer-gmp mapped to
integer-gmp-0.2.0.1-72436e28c79d056c87cc0d2d2f9f3773
wired-in package base mapped to
base-4.2.0.2-99442781c4fd10a8c30c35c9ce5fac5c
wired-in package rts mapped to builtin_rts
wired-in package haskell98 mapped to
haskell98-1.0.1.1-4d2891ad99eae334ff8234bcfbddce06
wired-in package template-haskell mapped to
template-haskell-2.4.0.1-7f84d967c8ff6750b3d865aff2a093e1
wired-in package dph-seq mapped to
dph-seq-0.4.0-1df951f78b4efbc84e2534bab253505d
wired-in package dph-par mapped to
dph-par-0.4.0-436308af1d9725eae22b56265f6035ec
Hsc static flags: -static
Created temporary directory:
/var/folders/Bo/BobN2Ap5GZW51e9o-n2Ack+++TI/-Tmp-/ghc5925_0
*** Checking old interface for main:Main:
*** Parser:
*** Renamer/typechecker:

Demo.hs:25:0:
Failed to load interface for `Paths_gnuplot':
  locations searched:
Paths_gnuplot.hi
Paths_gnuplot.hi-boot
*** Deleting temp files:
Deleting:
/var/folders/Bo/BobN2Ap5GZW51e9o-n2Ack+++TI/-Tmp-/ghc5925_0/ghc5925_0.s
Warning: deleting non-existent
/var/folders/Bo/BobN2Ap5GZW51e9o-n2Ack+++TI/-Tmp-/ghc5925_0/ghc5925_0.s
*** Deleting temp dirs:
Deleting: /var/folders/Bo/BobN2Ap5GZW51e9o-n2Ack+++TI/-Tmp-/ghc5925_0
~/wks/haskell-wks/gnuplot/gnuplot-0.4.2/src
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-10 Thread Henning Thielemann


On Sat, 11 Jun 2011, Dmitri O.Kondratiev wrote:


That's what I get (see below). What else should I do to install gnuplot?



~/wks/haskell-wks/gnuplot/gnuplot-0.4.2/srcghc -v Demo.hs


Do you really want to compile the Demo (with ghc)? It is already compiled 
if 'cabal install -fbuildExamples' was successful. Maybe you want to run 
'ghci' for interactive tests. But you need to tell 'ghci' the path to the 
Paths module. 'make ghci-demo' should call GHCi with the right options on 
Linux:


$ ghci -Wall -i:src:dist/build/autogen:execute/tmp src/Demo.hs



Did I already advertise the gnuplot mailing list?
  http://projects.haskell.org/cgi-bin/mailman/listinfo/gnuplot/

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-10 Thread Dmitri O.Kondratiev
On Sat, Jun 11, 2011 at 12:54 AM, Henning Thielemann 
lemm...@henning-thielemann.de wrote:


 On Sat, 11 Jun 2011, Dmitri O.Kondratiev wrote:

  That's what I get (see below). What else should I do to install gnuplot?


  ~/wks/haskell-wks/gnuplot/gnuplot-0.4.2/srcghc -v Demo.hs


 Do you really want to compile the Demo (with ghc)? It is already compiled
 if 'cabal install -fbuildExamples' was successful. Maybe you want to run
 'ghci' for interactive tests. But you need to tell 'ghci' the path to the
 Paths module. 'make ghci-demo' should call GHCi with the right options on
 Linux:

 $ ghci -Wall -i:src:dist/build/autogen:execute/tmp src/Demo.hs



 Did I already advertise the gnuplot mailing list?
  http://projects.haskell.org/cgi-bin/mailman/listinfo/gnuplot/


Yes, you did, thanks. Yet, please allow me to ask a few more questions here,
before I subscribe to gnuplot list. I am really short on time - must have
some plots for demo next Monday (

1) Can current version of gnuplot draw histograms? I need these first of
all.
2) It seems that $ ghci -Wall -i:src:dist/build/autogen:execute/tmp
src/Demo.hs
works on Mac OSX, yet I can't make it produce any output directly on screen.
How to generate output and display it immediately in an output window?

This is what I get:

~/wks/haskell-wks/gnuplot/gnuplot-0.4.2ghci -Wall
-i:src:dist/build/autogen:execute/tmp src/Demo.hs
GHCi, version 6.12.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
[ 1 of 33] Compiling Paths_gnuplot( dist/build/autogen/Paths_gnuplot.hs,
interpreted )
[ 2 of 33] Compiling Graphics.Gnuplot.Terminal (
src/Graphics/Gnuplot/Terminal.hs, interpreted )
[ 3 of 33] Compiling Graphics.Gnuplot.Execute (
execute/tmp/Graphics/Gnuplot/Execute.hs, interpreted )
[ 4 of 33] Compiling Graphics.Gnuplot.Utility (
src/Graphics/Gnuplot/Utility.hs, interpreted )
[ 5 of 33] Compiling Graphics.Gnuplot.Private.FrameOption (
src/Graphics/Gnuplot/Private/FrameOption.hs, interpreted )
[ 6 of 33] Compiling Graphics.Gnuplot.Private.FrameOptionSet (
src/Graphics/Gnuplot/Private/FrameOptionSet.hs, interpreted )
[ 7 of 33] Compiling Graphics.Gnuplot.Private.Graph (
src/Graphics/Gnuplot/Private/Graph.hs, interpreted )
[ 8 of 33] Compiling Graphics.Gnuplot.Private.GraphEmpty (
src/Graphics/Gnuplot/Private/GraphEmpty.hs, interpreted )
[ 9 of 33] Compiling Graphics.Gnuplot.Display (
src/Graphics/Gnuplot/Display.hs, interpreted )
[10 of 33] Compiling Graphics.Gnuplot.Private.Plot (
src/Graphics/Gnuplot/Private/Plot.hs, interpreted )
[11 of 33] Compiling Graphics.Gnuplot.Private.Frame (
src/Graphics/Gnuplot/Private/Frame.hs, interpreted )
[12 of 33] Compiling Graphics.Gnuplot.Private.ColorSpecification (
src/Graphics/Gnuplot/Private/ColorSpecification.hs, interpreted )
[13 of 33] Compiling Graphics.Gnuplot.Private.LineSpecification (
src/Graphics/Gnuplot/Private/LineSpecification.hs, interpreted )
[14 of 33] Compiling Graphics.Gnuplot.Value.Tuple (
src/Graphics/Gnuplot/Value/Tuple.hs, interpreted )
[15 of 33] Compiling Graphics.Gnuplot.Value.Atom (
src/Graphics/Gnuplot/Value/Atom.hs, interpreted )
[16 of 33] Compiling Graphics.Gnuplot.Value.ColumnSet (
src/Graphics/Gnuplot/Value/ColumnSet.hs, interpreted )
[17 of 33] Compiling Graphics.Gnuplot.Private.Graph2DType (
src/Graphics/Gnuplot/Private/Graph2DType.hs, interpreted )
[18 of 33] Compiling Graphics.Gnuplot.Private.Graph2D (
src/Graphics/Gnuplot/Private/Graph2D.hs, interpreted )
[19 of 33] Compiling Graphics.Gnuplot.Private.Graph3DType (
src/Graphics/Gnuplot/Private/Graph3DType.hs, interpreted )
[20 of 33] Compiling Graphics.Gnuplot.Private.Graph3D (
src/Graphics/Gnuplot/Private/Graph3D.hs, interpreted )
[21 of 33] Compiling Graphics.Gnuplot.MultiPlot (
src/Graphics/Gnuplot/MultiPlot.hs, interpreted )
[22 of 33] Compiling Graphics.Gnuplot.LineSpecification (
src/Graphics/Gnuplot/LineSpecification.hs, interpreted )
[23 of 33] Compiling Graphics.Gnuplot.Graph.ThreeDimensional (
src/Graphics/Gnuplot/Graph/ThreeDimensional.hs, interpreted )
[24 of 33] Compiling Graphics.Gnuplot.Graph.TwoDimensional (
src/Graphics/Gnuplot/Graph/TwoDimensional.hs, interpreted )
[25 of 33] Compiling Graphics.Gnuplot.Graph ( src/Graphics/Gnuplot/Graph.hs,
interpreted )
[26 of 33] Compiling Graphics.Gnuplot.Plot.ThreeDimensional (
src/Graphics/Gnuplot/Plot/ThreeDimensional.hs, interpreted )
[27 of 33] Compiling Graphics.Gnuplot.Plot.TwoDimensional (
src/Graphics/Gnuplot/Plot/TwoDimensional.hs, interpreted )
[28 of 33] Compiling Graphics.Gnuplot.Frame.OptionSet (
src/Graphics/Gnuplot/Frame/OptionSet.hs, interpreted )
[29 of 33] Compiling Graphics.Gnuplot.Frame.Option (
src/Graphics/Gnuplot/Frame/Option.hs, interpreted )
[30 of 33] Compiling Graphics.Gnuplot.Frame ( src/Graphics/Gnuplot/Frame.hs,
interpreted )
[31 of 33] Compiling Graphics.Gnuplot.Terminal.X11 (

Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-10 Thread Henning Thielemann


On Sat, 11 Jun 2011, Dmitri O.Kondratiev wrote:


Yes, you did, thanks. Yet, please allow me to ask a few more questions here, 
before I subscribe to gnuplot list. I am really
short on time - must have some plots for demo next Monday (

1) Can current version of gnuplot draw histograms? I need these first of all.
2) It seems that $ ghci -Wall -i:src:dist/build/autogen:execute/tmp 
src/Demo.hs
works on Mac OSX, yet I can't make it produce any output directly on screen.
How to generate output and display it immediately in an output window?


Calling 'main' from the Demo module should open several gnuplot windows 
showing some examples. If it does not, then this might be a difference of 
gnuplot between Mac and Linux. For PNG output use the Terminal.PNG module 
instead of Terminal.X11. In the latest version from darcs repository, 
there is also histogram support and a demo of it.


darcs get http://code.haskell.org/gnuplot/

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Ivan Lazar Miljenovic
On 3 June 2011 21:39, Dmitri O.Kondratiev doko...@gmail.com wrote:
 Hello,

 Please advise on Haskell 2D plotting libraries to generate plots,
 histograms, power spectra, bar charts, errorcharts, scatterplots, etc,
 similar to what Matplotlib does:
 http://matplotlib.sourceforge.net/

I was going to list the possible packages but found too many... so
search for chart and plot on Hackage:
http://hackage.haskell.org/package/

In particular, the Chart, plot and gnuplot libraries probably do what
you want (or at least a subset).

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Dmitri O.Kondratiev
On Fri, Jun 3, 2011 at 3:44 PM, Ivan Lazar Miljenovic 
ivan.miljeno...@gmail.com wrote:

 On 3 June 2011 21:39, Dmitri O.Kondratiev doko...@gmail.com wrote:
  Hello,
 
  Please advise on Haskell 2D plotting libraries to generate plots,
  histograms, power spectra, bar charts, errorcharts, scatterplots, etc,
  similar to what Matplotlib does:
  http://matplotlib.sourceforge.net/

 I was going to list the possible packages but found too many... so
 search for chart and plot on Hackage:
 http://hackage.haskell.org/package/

 In particular, the Chart, plot and gnuplot libraries probably do what
 you want (or at least a subset).

 --

Thanks!
I tried gnuplot:

GHCi, version 7.0.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude import Graphics.Gnuplot.Simple
Prelude Graphics.Gnuplot.Simple :l Demo.hs

Demo.hs:25:18:
Could not find module `Paths_gnuplot':
  Use -v to see a list of the files searched for.
Failed, modules loaded: none.
Prelude Graphics.Gnuplot.Simple


Where to get `Paths_gnuplot': module?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Antoine Latter
On Fri, Jun 3, 2011 at 9:57 AM, Dmitri O.Kondratiev doko...@gmail.com wrote:

 On Fri, Jun 3, 2011 at 3:44 PM, Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com wrote:

 On 3 June 2011 21:39, Dmitri O.Kondratiev doko...@gmail.com wrote:
  Hello,
 
  Please advise on Haskell 2D plotting libraries to generate plots,
  histograms, power spectra, bar charts, errorcharts, scatterplots, etc,
  similar to what Matplotlib does:
  http://matplotlib.sourceforge.net/

 I was going to list the possible packages but found too many... so
 search for chart and plot on Hackage:
 http://hackage.haskell.org/package/

 In particular, the Chart, plot and gnuplot libraries probably do what
 you want (or at least a subset).

 --

 Thanks!
 I tried gnuplot:

 GHCi, version 7.0.3: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package ffi-1.0 ... linking ... done.
 Prelude import Graphics.Gnuplot.Simple
 Prelude Graphics.Gnuplot.Simple :l Demo.hs

 Demo.hs:25:18:
     Could not find module `Paths_gnuplot':
   Use -v to see a list of the files searched for.
 Failed, modules loaded: none.
 Prelude Graphics.Gnuplot.Simple


 Where to get `Paths_gnuplot': module?


Have you installed the gnuplot package?

What command did you use to start GHCi?

Thanks,
Antoine


 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Malcolm Wallace
 I tried gnuplot: 
 
 Demo.hs:25:18:
 Could not find module `Paths_gnuplot':
   Use -v to see a list of the files searched for.
 Failed, modules loaded: none.
 Prelude Graphics.Gnuplot.Simple
 
 
 Where to get `Paths_gnuplot': module?

$ cd gnuplot-0.4.2
$ cabal install # this generates the Paths_gnuplot module
$ ghci

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Henning Thielemann
Malcolm Wallace schrieb:
 I tried gnuplot: 

 Demo.hs:25:18:
 Could not find module `Paths_gnuplot':
   Use -v to see a list of the files searched for.
 Failed, modules loaded: none.
 Prelude Graphics.Gnuplot.Simple


 Where to get `Paths_gnuplot': module?
 
 $ cd gnuplot-0.4.2
 $ cabal install # this generates the Paths_gnuplot module
 $ ghci

Yes, you must install the package before loading Demo into GHCi, since
the package contains a data file that the Demo wants to load.

Currently I am trying to interface to gnuplot's histogram feature.

You may also to subscribe to
   http://projects.haskell.org/cgi-bin/mailman/listinfo/gnuplot


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Dmitri O.Kondratiev
On Sat, Jun 4, 2011 at 12:55 AM, Henning Thielemann 
schlepp...@henning-thielemann.de wrote:

 Malcolm Wallace schrieb:
  I tried gnuplot:
 
  Demo.hs:25:18:
  Could not find module `Paths_gnuplot':
Use -v to see a list of the files searched for.
  Failed, modules loaded: none.
  Prelude Graphics.Gnuplot.Simple
 
 
  Where to get `Paths_gnuplot': module?
 
  $ cd gnuplot-0.4.2
  $ cabal install # this generates the Paths_gnuplot module
  $ ghci

 Yes, you must install the package before loading Demo into GHCi, since
 the package contains a data file that the Demo wants to load.

 Currently I am trying to interface to gnuplot's histogram feature.

 You may also to subscribe to
   http://projects.haskell.org/cgi-bin/mailman/listinfo/gnuplot


Thanks!
So, if I got this right,  I should run:
'cabal install -fbuildExamples gnuplot'
from gnuplot source root folder?

Yet first I need to build gnupolt for MacOSX and Win32 that I both use. Ok,
I'll give it a try...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Ivan Lazar Miljenovic
On 4 June 2011 07:11, Dmitri O.Kondratiev doko...@gmail.com wrote:
 So, if I got this right,  I should run:
 'cabal install -fbuildExamples gnuplot'
 from gnuplot source root folder?

You can either get the gnuplot tarball from Hackage, unpack it, and
then within the directory do cabal install -fbuildExamples (assuming
you want the examples).  Or else you can just do cabal install
-fbuildExamples gnuplot from anywhere and cabal-install will download
it, unpack it, build it, install it and then remove the unpacked
tarball.

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe