From: ·············@gmail.com
Subject: Generate plots with lisp
Date: 
Message-ID: <1184165275.682983.192160@g4g2000hsf.googlegroups.com>
Hi,

I am using (c)lisp to compute a geometry of a channel network.  I
would like the same code to generate a drawing.  My plots will
consists mainly of lines and arcs.

My first approach was to create files in the xfig format, and that
works.  However, I never leave good-enough alone, and try for the
slightly better, and thought that creating a drawing in post-script
would be better (since printing xfig files requires conversion to
postscript, and then from there to other formats, like png).  Plus, I
get to learn a bit more lisp (I am at the ground floor right now).

I found plisp which is essentially the ps language, but in lisp
syntax.  I think that I will write some higher lever routines for
easier line and curve drawing.

But I am wondering if there is some other lisp package with drawing
commands, whose output is a graphics file that can be manipulated or
printed (.png, svg)

Thanks,

Mirko

From: Zach Beane
Subject: Re: Generate plots with lisp
Date: 
Message-ID: <m3ps2zt2dz.fsf@unnamed.xach.com>
·············@gmail.com writes:

> But I am wondering if there is some other lisp package with drawing
> commands, whose output is a graphics file that can be manipulated or
> printed (.png, svg)

I've been very pleased with CL-PDF for such purposes.

Zach
From: GP lisper
Subject: Re: Generate plots with lisp
Date: 
Message-ID: <slrnf9aamo.m3c.spambait@phoenix.clouddancer.com>
On Wed, 11 Jul 2007 07:47:55 -0700, <·············@gmail.com> wrote:
>
> But I am wondering if there is some other lisp package with drawing
> commands, whose output is a graphics file that can be manipulated or
> printed (.png, svg)

cl-gnuplot
which has a postscript output option

Please post some feedback on what you use, as I have an 'arc' project
in a couple of weeks.

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

-- 
Posted via a free Usenet account from http://www.teranews.com
From: Rainer Joswig
Subject: Re: Generate plots with lisp
Date: 
Message-ID: <joswig-DD9D01.17073911072007@news-europe.giganews.com>
In article <························@g4g2000hsf.googlegroups.com>,
 ·············@gmail.com wrote:

> Hi,
> 
> I am using (c)lisp to compute a geometry of a channel network.  I
> would like the same code to generate a drawing.  My plots will
> consists mainly of lines and arcs.
> 
> My first approach was to create files in the xfig format, and that
> works.  However, I never leave good-enough alone, and try for the
> slightly better, and thought that creating a drawing in post-script
> would be better (since printing xfig files requires conversion to
> postscript, and then from there to other formats, like png).  Plus, I
> get to learn a bit more lisp (I am at the ground floor right now).
> 
> I found plisp which is essentially the ps language, but in lisp
> syntax.  I think that I will write some higher lever routines for
> easier line and curve drawing.
> 
> But I am wondering if there is some other lisp package with drawing
> commands, whose output is a graphics file that can be manipulated or
> printed (.png, svg)
> 
> Thanks,
> 
> Mirko

Some CLIM versions allow you to use the CLIM drawing
primitives and generate PS output. I guess there
could be some bitrot, though...

-- 
http://lispm.dyndns.org
From: Tamas Papp
Subject: Re: Generate plots with lisp
Date: 
Message-ID: <87ps2zht4p.fsf@pu100877.student.princeton.edu>
·············@gmail.com writes:

> Hi,
>
> I am using (c)lisp to compute a geometry of a channel network.  I
> would like the same code to generate a drawing.  My plots will
> consists mainly of lines and arcs.
>
> My first approach was to create files in the xfig format, and that
> works.  However, I never leave good-enough alone, and try for the
> slightly better, and thought that creating a drawing in post-script
> would be better (since printing xfig files requires conversion to
> postscript, and then from there to other formats, like png).  Plus, I
> get to learn a bit more lisp (I am at the ground floor right now).
>
> I found plisp which is essentially the ps language, but in lisp
> syntax.  I think that I will write some higher lever routines for
> easier line and curve drawing.
>
> But I am wondering if there is some other lisp package with drawing
> commands, whose output is a graphics file that can be manipulated or
> printed (.png, svg)

Check out my cl-cairo2 package at
http://common-lisp.net/project/cl-cairo2/.  You can draw on PS, PDF,
SVG and bitmap surfaces, or even in an X11 window.

HTH,

Tamas
From: ···········@gmail.com
Subject: Re: Generate plots with lisp
Date: 
Message-ID: <1184196118.437861.84510@m37g2000prh.googlegroups.com>
> But I am wondering if there is some other lisp package with drawing
> commands, whose output is a graphics file that can be manipulated or
> printed (.png, svg)
>

It may be worth looking at cl-magick (http://common-lisp.net/project/
cl-magick/), the Lisp bindings for the ImageMagick graphics program.
This allows you to do pretty much everything you could ever want to do
to an image.

Ta,
Andrew
From: ·············@gmail.com
Subject: Re: Generate plots with lisp
Date: 
Message-ID: <1184702138.890663.138860@x35g2000prf.googlegroups.com>
On Jul 11, 10:47 am, ·············@gmail.com wrote:
> Hi,
>
> I am using (c)lisp to compute a geometry of a channel network.  I
> would like the same code to generate a drawing.  My plots will
> consists mainly of lines and arcs.
>
> My first approach was to create files in the xfig format, and that
> works.  However, I never leave good-enough alone, and try for the
> slightly better, and thought that creating a drawing in post-script
> would be better (since printing xfig files requires conversion to
> postscript, and then from there to other formats, like png).  Plus, I
> get to learn a bit more lisp (I am at the ground floor right now).
>
> I found plisp which is essentially the ps language, but in lisp
> syntax.  I think that I will write some higher lever routines for
> easier line and curve drawing.
>
> But I am wondering if there is some other lisp package with drawing
> commands, whose output is a graphics file that can be manipulated or
> printed (.png, svg)
>
> Thanks,
>
> Mirko

I want to thank to all of you that have replied.

I have not tested any of the suggestions yet.  I was still playing
with plisp.  Unfortunately, I don't think I will go with it because it
is a front-end to lisp, and as such it strips away some of the lisp
functionality (like list operations).  I was looking for a full lisp
with _additional_ plotting capabilities.

I think that I will first try cl-pdf because it has the least amount
of overhead -- no additional software required.  (cl-cairo looks
impressive, but I would need to install cairo first, and I would like
to keep things simple for now, espetially since I am on a windows
machine.

Thanks again,

Mirko
From: Robert Dodier
Subject: Re: Generate plots with lisp
Date: 
Message-ID: <1184860769.548306.240270@n2g2000hse.googlegroups.com>
On Jul 11, 8:47 am, ·············@gmail.com wrote:

> I am using (c)lisp to compute a geometry of a channel network.  I
> would like the same code to generate a drawing.  My plots will
> consists mainly of lines and arcs.

If you are working with lines & arcs, you might consider
using GraphViz to generate the layout. I think GraphViz
can generate various output formats. The website is
http://graphviz.org/. Have fun.

Robert Dodier
From: Mirko Vukovic
Subject: Re: Generate plots with lisp
Date: 
Message-ID: <469fb35e$0$20582$4c368faf@roadrunner.com>
"Robert Dodier" <·············@gmail.com> wrote in message 
·····························@n2g2000hse.googlegroups.com...
> On Jul 11, 8:47 am, ·············@gmail.com wrote:
>
>> I am using (c)lisp to compute a geometry of a channel network.  I
>> would like the same code to generate a drawing.  My plots will
>> consists mainly of lines and arcs.
>
> If you are working with lines & arcs, you might consider
> using GraphViz to generate the layout. I think GraphViz
> can generate various output formats. The website is
> http://graphviz.org/. Have fun.
>
> Robert Dodier
>

Robert,

My needs are more "hard-coded".  I will generate specific coordinates based 
on a (simple) algorithm, and I need a faithfull drawing of the network. 
Graphviz seems to be a higher-level package where I signal my intent, and it 
generates the coordinates.

But I'll keep graphviz in mind for future reference.

Thanks..

Mirko 
From: GP lisper
Subject: Re: Generate plots with lisp
Date: 
Message-ID: <slrnfa2jqq.a72.spambait@phoenix.clouddancer.com>
On Thu, 19 Jul 2007 14:54:21 -0400, <········@nycap.rr.com> wrote:
>
> "Robert Dodier" <·············@gmail.com> wrote in message 
> ·····························@n2g2000hse.googlegroups.com...
>> On Jul 11, 8:47 am, ·············@gmail.com wrote:
>>
>>> I am using (c)lisp to compute a geometry of a channel network.  I
>>> would like the same code to generate a drawing.  My plots will
>>> consists mainly of lines and arcs.
>>
>> http://graphviz.org/. Have fun.
>>
> My needs are more "hard-coded".  I will generate specific coordinates based 
> on a (simple) algorithm, and I need a faithfull drawing of the network. 
> Graphviz seems to be a higher-level package where I signal my intent, and it 
> generates the coordinates.


After using cl-gnuplot this last week, I would suggest that simply
feeding it the channel endpoints with a appropriate smoothing choice
will solve this.

This is the cl-gnuplot from 'Ryan', which uses the superior pipe
method.  Found at:

http://www.inference.phy.cam.ac.uk/rpa23/code/cl-gnuplot.lisp

(plot-add-series plot series2
                     :style  "lines"
                     :title  "Network"
                     :smooth "bezier"
                     :axes   "x2y1")

Other smooth choices are available, I had b-splines running.  I'll be
trying a 'network' drawing myself in the next week or so.

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

-- 
Posted via a free Usenet account from http://www.teranews.com