From: Slobodan Blazeski
Subject: Any library  for visual representation of charts ?
Date: 
Message-ID: <1184961672.204561.68800@r34g2000hsd.googlegroups.com>
I've stumbled to a need to visualize some graph data. Any library that
do things like pies,  histograms,  box & whiskers .. ? The only thing
I found  is  PLOT-2D which looks nice but I'm little worried about how
it will work under windows.

Any recommendation ?

thanks
bobi

From: Slobodan Blazeski
Subject: Re: Any library for visual representation of charts ?
Date: 
Message-ID: <1184962469.830151.254480@n2g2000hse.googlegroups.com>
On Jul 20, 10:01 pm, Slobodan Blazeski <·················@gmail.com>
wrote:
> I've stumbled to a need to visualize some graph data. Any library that
> do things like pies,  histograms,  box & whiskers .. ? The only thing
> I found  is  PLOT-2D which looks nice but I'm little worried about how
> it will work under windows.
>
> Any recommendation ?
>
> thanks
> bobi

And http://common-lisp.net/project/cl-plplot/ . Anybody used them ?
From: ·············@gmail.com
Subject: Re: Any library for visual representation of charts ?
Date: 
Message-ID: <1184967621.582497.242200@g4g2000hsf.googlegroups.com>
On Jul 20, 4:14 pm, Slobodan Blazeski <·················@gmail.com>
wrote:
> On Jul 20, 10:01 pm, Slobodan Blazeski <·················@gmail.com>
> wrote:
>
> > I've stumbled to a need to visualize some graph data. Any library that
> > do things like pies,  histograms,  box & whiskers .. ? The only thing
> > I found  is  PLOT-2D which looks nice but I'm little worried about how
> > it will work under windows.
>
> > Any recommendation ?
>
> > thanks
> > bobi
>
> Andhttp://common-lisp.net/project/cl-plplot/. Anybody used them ?

See the recent thread "Generate plots with lisp" for suggestions.

There were several interesting suggestions.  I have tried to implement
cl-pdf, but I am having some trouble
running the examples.  I have emailed the author of the package, and
if you are interested, I can keep you
posted.


(I am running clisp via cygwin on windows)

Mirko
From: GP lisper
Subject: Re: Any library  for visual representation of charts ?
Date: 
Message-ID: <slrnfa2l23.a72.spambait@phoenix.clouddancer.com>
On Fri, 20 Jul 2007 13:01:12 -0700, <·················@gmail.com> wrote:
> I've stumbled to a need to visualize some graph data. Any library that
> do things like pies,  histograms,  box & whiskers .. ? The only thing

box & whiskers?  If that is 'candlesticks' from the stock-charting
world, then gnuplot 4.2 includes candlesticks and histograms.  'Pies'
might exist too, but they can be created from the toolset in any case.


-- 
There are no average Common Lisp programmers
Reply-To: email is ignored.

-- 
Posted via a free Usenet account from http://www.teranews.com
From: Slobodan Blazeski
Subject: Re: Any library for visual representation of charts ?
Date: 
Message-ID: <1185044560.912594.212560@w3g2000hsg.googlegroups.com>
Thanks everybody for their replies, it looks like that I'll be forced
to use cffi. CFFi is nice bridge but I prefer pure lisp solution.
From: David Trudgett
Subject: Re: Any library  for visual representation of charts ?
Date: 
Message-ID: <f7rg5q$lui$1@news-01.bur.connect.com.au>
Hi Slobodan,

Slobodan Blazeski wrote:
> I've stumbled to a need to visualize some graph data. Any library that
> do things like pies,  histograms,  box & whiskers .. ? The only thing
> I found  is  PLOT-2D which looks nice but I'm little worried about how
> it will work under windows.

I haven't known or used either of the two libraries you mentioned. 
Instead, I use (Windows) (C)Lisp to create scripts for the R statistical 
package, then call out to R and run the scripts to produce my box and 
whisker and bar plots.

R has a horrible syntax but apparently is Scheme based underneath (they 
hide it well, if that's the case -- I wish they would provide a real 
Scheme syntax!). However, it is quite capable once you bend your mind to 
  what to me feels like a very quirky way of doing things.

Doing the above is obviously not a "pure lisp" solution, but practically 
speaking, it *is* a solution, and I have in fact deployed it to a 
"production" Windows environment (although in an experimental, prototype 
sort of way -- it's not the main app, only a relatively unimportant 
supporting tool).

To create a box plot and bar plot, I did something like the following, 
which looks really ugly, but gets the job done:

     ;; Box Plot
     (format stream
	    (concatenate 'string
			 "~&png(filename = \"~A\", "
                          "width = ~A, height = ~A, pointsize = 12, "
			 "bg = \"white\", res = NA, "
                          "restoreConsole = TRUE)~%")
	    box-png png-width png-height)
     (format stream
	    (concatenate 'string
			 "~&boxplot(hourly, names=c(1:length(hourly)), "
			 "ylim=c(0,max(hourly)), main=\"~A\", "
			 "sub=\"~A\", ylab=\"~A\")~%")
	    nice-title-string report-month box-y-label)
     (format stream "axis(side=4)~%")
     (format stream "dev.off()~%")

     ;; Bar Plot
     (format stream
	    (concatenate 'string
			 "~&png(filename = \"~A\", "
                          "width = ~A, height = ~A, pointsize = 12, "
			 "bg = \"white\", res = NA, "
                          "restoreConsole = TRUE)~%")
	    bar-png png-width png-height)
     (format stream
	    (concatenate 'string
			 "~&x <- barplot(height=as.matrix(hourly), "
                          "names=c(1:length(hourly)), "
			 "main=\"~A\", sub=\"~A\", "
                          "ylab=\"~A\", col=\"PaleGoldenRod\")~%")
	    nice-title-string report-month bar-y-label)
     (format stream "~&axis(side=4)~%")
     (format stream "~&dev.off()~%")

To call the script, something like the following does the job:

(ext:run-program "c:/path/to/r.exe"
                  :arguments '("--silent" "--no-save")
                  :input script-name
                  :output nil)

"ext:run-program" is a CLISP thing. Most lisps have an equivalent, I think.


One may not like this approach, but at least it's another way to solve 
the problem. (By the way, the above method takes only a second or three 
to generate a couple of dozen charts in PNG image format.)

Cheers,
David
From: jkc
Subject: Re: Any library  for visual representation of charts ?
Date: 
Message-ID: <pan.2007.08.05.14.08.51.410950@makewavs.com>
On Fri, 20 Jul 2007 13:01:12 -0700, Slobodan Blazeski wrote:

> I've stumbled to a need to visualize some graph data. Any library that
> do things like pies,  histograms,  box & whiskers .. ? The only thing
> I found  is  PLOT-2D which looks nice but I'm little worried about how
> it will work under windows.
> 
> Any recommendation ?
> 
> thanks
> bobi

I've been using Edi Weitz's cl-gd:

http://weitz.de/cl-gd/

Its easy to extend and works very well. 

--Jeff