unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Plotting in Guile
@ 2010-07-28 15:21 Joel James Adamson
  2010-07-28 16:04 ` Hans Aberg
                   ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Joel James Adamson @ 2010-07-28 15:21 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

Hello,

I am using Guile to iterate equations and produce trajectories from
those iterations.  My current strategy is to redirect the stdout to a
file and then use GNUPLOT to plot the trajectories as parametric
plots.  However, I would like to contain everything within one program,
to keep Makefiles simple and (ideally) only deal with one programming
language for the project.

Any suggestions on how to accomplish this?

1. Is there is a plotting extension for guile, or a library that I could
use in such a way?  The advantage of GNUPLOT is that it can produce many
different kinds of output, including SVG and Pstricks code.  If a
plotting module exists, I haven't found it yet.

2. My thoughts were that I could use the POSIX IPC modules available in
Guile to run GNUPLOT and send commands through a pipe or other
appropriate interface.  Despite knowing little of how IPC works or the
best way to accomplish this, I always like to learn something new.  Does
this sound like it's worthwhile or like it would work at all?

Thanks,

Joel
-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 15:21 Plotting in Guile Joel James Adamson
@ 2010-07-28 16:04 ` Hans Aberg
  2010-07-28 17:54   ` Joel James Adamson
  2010-07-28 16:16 ` Mike Gran
  2010-08-18 15:37 ` Andy Wingo
  2 siblings, 1 reply; 34+ messages in thread
From: Hans Aberg @ 2010-07-28 16:04 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

On 28 Jul 2010, at 17:21, Joel James Adamson wrote:

> I am using Guile to iterate equations and produce trajectories from
> those iterations.  My current strategy is to redirect the stdout to a
> file and then use GNUPLOT to plot the trajectories as parametric
> plots.  However, I would like to contain everything within one  
> program,
> to keep Makefiles simple and (ideally) only deal with one programming
> language for the project.

GNUPLOT seems to require pipes, if not using a file.

> 2. My thoughts were that I could use the POSIX IPC modules available  
> in
> Guile to run GNUPLOT and send commands through a pipe or other
> appropriate interface.

Guile has a command scm_pipe() (see manual). It is not difficult to  
link to C-code - that is a point of using Guile.

You might also define a new type, which i Guile is called a SMOB  
(small object). Again, this is not difficult to do.

   Hans





^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 15:21 Plotting in Guile Joel James Adamson
  2010-07-28 16:04 ` Hans Aberg
@ 2010-07-28 16:16 ` Mike Gran
  2010-07-28 16:56   ` Joel James Adamson
  2010-07-29  7:01   ` Thien-Thi Nguyen
  2010-08-18 15:37 ` Andy Wingo
  2 siblings, 2 replies; 34+ messages in thread
From: Mike Gran @ 2010-07-28 16:16 UTC (permalink / raw)
  To: Joel James Adamson, guile-user

> Hello,
> 
> 1. Is there is a plotting extension for guile, or a library that I could
> use in such a way?  The advantage of GNUPLOT is that it can produce many
> different kinds of output, including SVG and Pstricks code.  If a
> plotting module exists, I haven't found it yet.

For my own personal use, I have a Guile binding of GNU Plotutils.  I had
planned that someday I'd clean it up and making it available.  It has most
of the functionality of the GNU Plotutils 'graph' program.  

(But, I guess if you want a solution today, my vaporware isn't going to help.)

-Mike Gran



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 16:16 ` Mike Gran
@ 2010-07-28 16:56   ` Joel James Adamson
  2010-07-28 17:20     ` Mike Gran
  2010-07-29  7:01   ` Thien-Thi Nguyen
  1 sibling, 1 reply; 34+ messages in thread
From: Joel James Adamson @ 2010-07-28 16:56 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

Mike Gran <spk121@yahoo.com> writes:

>> Hello,
>> 
>> 1. Is there is a plotting extension for guile, or a library that I could
>> use in such a way?  The advantage of GNUPLOT is that it can produce many
>> different kinds of output, including SVG and Pstricks code.  If a
>> plotting module exists, I haven't found it yet.
>
> For my own personal use, I have a Guile binding of GNU Plotutils.  I had
> planned that someday I'd clean it up and making it available.  It has most
> of the functionality of the GNU Plotutils 'graph' program.  

My questions:
1.  What is the status of Plotutils?  I looked into it a while ago and
    it seemed really out of date and seemed to have a very small user
    community
2. Can plotutils produce a variety of outputs?  Pstricks or EPS output
   would be best; SVG would be a plus

> (But, I guess if you want a solution today, my vaporware isn't going
> to help.)

Today would be nice, but before I graduate is more what I'm looking
for.  If plotutils is what I'm looking for, then perhaps we can
collaborate to make your code more presentable.

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 16:56   ` Joel James Adamson
@ 2010-07-28 17:20     ` Mike Gran
  2010-07-28 17:59       ` Joel James Adamson
  0 siblings, 1 reply; 34+ messages in thread
From: Mike Gran @ 2010-07-28 17:20 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

> > For my own personal use, I have a Guile binding of GNU Plotutils.  I had
> > planned that someday I'd clean it up and making it available.  It has most
> > of the functionality of the GNU Plotutils 'graph' program.  
> 
> My questions:
> 1.  What is the status of Plotutils?  I looked into it a while ago and
>     it seemed really out of date and seemed to have a very small user
>     community

I think it is more dead than alive, I think.  There are bug-fix releases, 
including one in late 2009, but, the official gnu website hasn't been updated 
in a decade or so.  There is no git repo, so it is hard to know if any work
is being done on it.

Even so, it does a great job at your standard 2D graphs.

> 2. Can plotutils produce a variety of outputs?  Pstricks or EPS output
>   would be best; SVG would be a plus

It claims to be able to do PS, PNG and SVG, and some other obscure formats.
I've only used X, tek, and PNG. I don't think it'll do Pstricks.

What is the state of the are in open-source plot libraries these days?

-Mike Gran



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 16:04 ` Hans Aberg
@ 2010-07-28 17:54   ` Joel James Adamson
  2010-07-28 18:26     ` Linas Vepstas
                       ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Joel James Adamson @ 2010-07-28 17:54 UTC (permalink / raw)
  To: Hans Aberg; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

Hans Aberg <haberg-1@telia.com> writes:

> On 28 Jul 2010, at 17:21, Joel James Adamson wrote:
>
>> I am using Guile to iterate equations and produce trajectories from
>> those iterations.  My current strategy is to redirect the stdout to a
>> file and then use GNUPLOT to plot the trajectories as parametric
>> plots.  However, I would like to contain everything within one
>> program,
>> to keep Makefiles simple and (ideally) only deal with one programming
>> language for the project.
>
> GNUPLOT seems to require pipes, if not using a file.

The question from the IPC newbie (myself): is there something wrong with
pipes?  I've read a basic tutorial and they seem to do what I would
need, but the author seemed to think they were worthless.  Educate me.

>> 2. My thoughts were that I could use the POSIX IPC modules available
>> in
>> Guile to run GNUPLOT and send commands through a pipe or other
>> appropriate interface.
>
> Guile has a command scm_pipe() (see manual). It is not difficult to
> link to C-code - that is a point of using Guile.

So would I write a C program to handle the IPC between guile and
GNUPLOT, and then control it with Scheme?

Thanks,
Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 17:20     ` Mike Gran
@ 2010-07-28 17:59       ` Joel James Adamson
  0 siblings, 0 replies; 34+ messages in thread
From: Joel James Adamson @ 2010-07-28 17:59 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]

Mike Gran <spk121@yahoo.com> writes:

>> > For my own personal use, I have a Guile binding of GNU Plotutils.  I had
>> > planned that someday I'd clean it up and making it available.  It has most
>> > of the functionality of the GNU Plotutils 'graph' program.  
>> 
>> My questions:
>> 1.  What is the status of Plotutils?  I looked into it a while ago and
>>     it seemed really out of date and seemed to have a very small user
>>     community
>
> I think it is more dead than alive, I think.  There are bug-fix
> releases, including one in late 2009, but, the official gnu website
> hasn't been updated in a decade or so.  There is no git repo, so it is
> hard to know if any work is being done on it.

I've just created svg and ps versions of one graph using "graph."
Pretty easy.  The big problem is getting the look of the rest of my
LaTeX document within the graph (e.g. axis labels).  I wouldn't want to
get a new look just so I can use a particular graphing package when
another offers the more flexible option.

> What is the state of the are in open-source plot libraries these days?

It seems the best options are GNUPLOT and a relative newcomer called
PLPlot[1] that I will try out today.

Joel

Footnotes: 
[1]  http://plplot.sourceforge.net/

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 17:54   ` Joel James Adamson
@ 2010-07-28 18:26     ` Linas Vepstas
  2010-07-28 18:43       ` Joel James Adamson
  2010-07-28 18:45     ` Hans Aberg
  2010-07-29 18:57     ` Neil Jerram
  2 siblings, 1 reply; 34+ messages in thread
From: Linas Vepstas @ 2010-07-28 18:26 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

On 28 July 2010 12:54, Joel James Adamson <adamsonj@email.unc.edu> wrote:
> Hans Aberg <haberg-1@telia.com> writes:
>>
>> GNUPLOT seems to require pipes, if not using a file.
>
> The question from the IPC newbie (myself): is there something wrong with
> pipes?  I've read a basic tutorial and they seem to do what I would
> need, but the author seemed to think they were worthless.  Educate me.

Nothing. If you are a young programmer who is used to subroutine API's
then working with pipes is disconcerting. If you are a hot-shot web
designer, then the fact that its not XML and RPC and DTD and
stylesheets and whatever makes it feel stone-age. I'm guessing the
tutorial author was one/both of those.

--linas



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 18:26     ` Linas Vepstas
@ 2010-07-28 18:43       ` Joel James Adamson
  2010-07-29  6:52         ` Thien-Thi Nguyen
  0 siblings, 1 reply; 34+ messages in thread
From: Joel James Adamson @ 2010-07-28 18:43 UTC (permalink / raw)
  To: linasvepstas; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

Linas Vepstas <linasvepstas@gmail.com> writes:

> On 28 July 2010 12:54, Joel James Adamson <adamsonj@email.unc.edu> wrote:
>> Hans Aberg <haberg-1@telia.com> writes:
>>>
>>> GNUPLOT seems to require pipes, if not using a file.
>>
>> The question from the IPC newbie (myself): is there something wrong with
>> pipes?  I've read a basic tutorial and they seem to do what I would
>> need, but the author seemed to think they were worthless.  Educate me.
>
> Nothing. If you are a young programmer who is used to subroutine API's
> then working with pipes is disconcerting. If you are a hot-shot web
> designer, then the fact that its not XML and RPC and DTD and
> stylesheets and whatever makes it feel stone-age. I'm guessing the
> tutorial author was one/both of those.

I see your point: I'm Unix to the core!

I just have to figure out how to use pipes...

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 17:54   ` Joel James Adamson
  2010-07-28 18:26     ` Linas Vepstas
@ 2010-07-28 18:45     ` Hans Aberg
  2010-07-28 18:50       ` Joel James Adamson
  2010-07-29 18:57     ` Neil Jerram
  2 siblings, 1 reply; 34+ messages in thread
From: Hans Aberg @ 2010-07-28 18:45 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

On 28 Jul 2010, at 19:54, Joel James Adamson wrote:

>> GNUPLOT seems to require pipes, if not using a file.
>
> The question from the IPC newbie (myself): is there something wrong  
> with
> pipes?  I've read a basic tutorial and they seem to do what I would
> need, but the author seemed to think they were worthless.  Educate me.

I'm no expert, but pipes are simple and effective, though somewhat  
limited, as one program must be the descendant of another. Bison uses  
a pipe to call M4, which works just fine, and you have a similar  
application. Earlier, it used the writing file variation, and there is  
a problem with cleanup.

>>> 2. My thoughts were that I could use the POSIX IPC modules available
>>> in
>>> Guile to run GNUPLOT and send commands through a pipe or other
>>> appropriate interface.
>>
>> Guile has a command scm_pipe() (see manual). It is not difficult to
>> link to C-code - that is a point of using Guile.
>
> So would I write a C program to handle the IPC between guile and
> GNUPLOT, and then control it with Scheme?

Guile has both scm_pipe() to use in a C program, and pipe to use in  
Scheme code. So you might try calling it directly. If you turn GNUPLOT  
into a library, you can link it directly to Guile.

   Hans





^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 18:45     ` Hans Aberg
@ 2010-07-28 18:50       ` Joel James Adamson
  2010-07-28 20:56         ` Hans Aberg
  0 siblings, 1 reply; 34+ messages in thread
From: Joel James Adamson @ 2010-07-28 18:50 UTC (permalink / raw)
  To: Hans Aberg; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

Hans Aberg <haberg-1@telia.com> writes:

> Guile has both scm_pipe() to use in a C program, and pipe to use in
> Scheme code. So you might try calling it directly. If you turn GNUPLOT
> into a library, you can link it directly to Guile.

There was such a library a few years back, but it is now out of synch
with the main GNUPLOT development line.

The first thing I need to do (I think) is learn more about how GNUPLOT
can be manipulated.

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 18:50       ` Joel James Adamson
@ 2010-07-28 20:56         ` Hans Aberg
  0 siblings, 0 replies; 34+ messages in thread
From: Hans Aberg @ 2010-07-28 20:56 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

On 28 Jul 2010, at 20:50, Joel James Adamson wrote:

>> Guile has both scm_pipe() to use in a C program, and pipe to use in
>> Scheme code. So you might try calling it directly. If you turn  
>> GNUPLOT
>> into a library, you can link it directly to Guile.
>
> There was such a library a few years back, but it is now out of synch
> with the main GNUPLOT development line.
>
> The first thing I need to do (I think) is learn more about how GNUPLOT
> can be manipulated.

It is probably simplest to not turn it into a library on your own  
except for experimentation.

   Hans





^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 18:43       ` Joel James Adamson
@ 2010-07-29  6:52         ` Thien-Thi Nguyen
  2010-07-29 14:59           ` Joel James Adamson
  0 siblings, 1 reply; 34+ messages in thread
From: Thien-Thi Nguyen @ 2010-07-29  6:52 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

() Joel James Adamson <adamsonj@email.unc.edu>
() Wed, 28 Jul 2010 14:43:49 -0400

   I just have to figure out how to use pipes...

Have you looked at the friendly manual?  If you find something
there is unclear, we can kill two birds with one stone:

 - improve the manual (with cooperation from Guile hackers)
 - help a (pipes w/ Guile) newbie

Even if everything is perfectly clear, perhaps such an
application (Guile + GNUPLOT) can serve as a small example.
In this way we can ratchet the manual's usefulness.



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 16:16 ` Mike Gran
  2010-07-28 16:56   ` Joel James Adamson
@ 2010-07-29  7:01   ` Thien-Thi Nguyen
  2010-07-29 14:52     ` Joel James Adamson
  2010-07-30  2:40     ` Mike Gran
  1 sibling, 2 replies; 34+ messages in thread
From: Thien-Thi Nguyen @ 2010-07-29  7:01 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user

() Mike Gran <spk121@yahoo.com>
() Wed, 28 Jul 2010 09:16:21 -0700 (PDT)

   Guile binding of GNU Plotutils
   [...]
   planned that someday I'd clean it up and making it available

I recently (last few months) got some practice adding Guile-foo projects
to Savannah.  Although not difficult, it is admittedly a little tedious.
If you send me the repo, i could set up "Guile Plot Utilities" (project
name "guile-plotutils") with you and me as co-admins (presuming you get
a Savannah account at some point).  This would be "non-GNU" for now.
WDYT?



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-29  7:01   ` Thien-Thi Nguyen
@ 2010-07-29 14:52     ` Joel James Adamson
  2010-07-29 15:21       ` Thien-Thi Nguyen
  2010-07-30  2:40     ` Mike Gran
  1 sibling, 1 reply; 34+ messages in thread
From: Joel James Adamson @ 2010-07-29 14:52 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

Thien-Thi Nguyen <ttn@gnuvola.org> writes:

> () Mike Gran <spk121@yahoo.com>
> () Wed, 28 Jul 2010 09:16:21 -0700 (PDT)
>
>    Guile binding of GNU Plotutils
>    [...]
>    planned that someday I'd clean it up and making it available
>
> I recently (last few months) got some practice adding Guile-foo projects
> to Savannah.  Although not difficult, it is admittedly a little tedious.
> If you send me the repo, i could set up "Guile Plot Utilities" (project
> name "guile-plotutils") with you and me as co-admins (presuming you get
> a Savannah account at some point).  This would be "non-GNU" for now.
> WDYT?

I would definitely work on that (if you're inviting me).

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-29  6:52         ` Thien-Thi Nguyen
@ 2010-07-29 14:59           ` Joel James Adamson
  2010-07-29 15:14             ` Thien-Thi Nguyen
  0 siblings, 1 reply; 34+ messages in thread
From: Joel James Adamson @ 2010-07-29 14:59 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

Thien-Thi Nguyen <ttn@gnuvola.org> writes:

> () Joel James Adamson <adamsonj@email.unc.edu>
> () Wed, 28 Jul 2010 14:43:49 -0400
>
>    I just have to figure out how to use pipes...
>
> Have you looked at the friendly manual?

Not YET.  I was just reiterating that I'm a newbie to anything involving
IPC and therefore don't know /in general/ how pipes work.  I'm sure that
once I understand how to manipulate pipes programmatically in the GNU
System that the Guile manual will be perfectly clear to me.

Here's another idea that I had, and you more-experienced blokes can tell
me if this is totally nutty:

A small C program could act as a daemon that feeds instructions to
GNUPLOT through a pipe, but the daemon could be accessed through a
socket.  My client (Guile) program can do all its calculating and then
pass the data through the socket.  This way I could still (by sending
the right message) interact with GNUPLOT after an initial plot is made.
However, that seems like going back to my current mechanism:

iterating program -> file -> GNUPLOT

The problem is that I haven't yet figured out how to get GNUPLOT to
accept *data* through stdin.  It will take commands, and this is clearly
documented.  I will pose this to a GNUPLOT list.

Plotutils on the other hand, was set up for exactly this kind of
programming, so I may throw my weight behind that.

Thanks,

Joel
-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-29 14:59           ` Joel James Adamson
@ 2010-07-29 15:14             ` Thien-Thi Nguyen
  2010-07-29 17:34               ` Joel James Adamson
  0 siblings, 1 reply; 34+ messages in thread
From: Thien-Thi Nguyen @ 2010-07-29 15:14 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

() Joel James Adamson <adamsonj@email.unc.edu>
() Thu, 29 Jul 2010 10:59:33 -0400

   A small C program could act as a daemon that feeds instructions to
   GNUPLOT through a pipe, but the daemon could be accessed through a
   socket.

This sounds like a good idea to me.  There is no need for C, however
(presuming high performance is not a requirement); Guile has all the
facilities for writing (proxy or otherwise) daemons.  For example, sizzweb:

http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#sizzweb

can listen on a TCP port or a Unix-domain socket (but not both, by design,
i.e., not a limitation of Guile).



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-29 14:52     ` Joel James Adamson
@ 2010-07-29 15:21       ` Thien-Thi Nguyen
  2010-07-29 17:31         ` Joel James Adamson
  0 siblings, 1 reply; 34+ messages in thread
From: Thien-Thi Nguyen @ 2010-07-29 15:21 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

() Joel James Adamson <adamsonj@email.unc.edu>
() Thu, 29 Jul 2010 10:52:25 -0400

   I would definitely work on that (if you're inviting me).

If All Goes Well (i.e., Mike Gran makes a repo public under nice
license and you finangle a savannah account in the near future),
then consider yourself invited!



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-29 15:21       ` Thien-Thi Nguyen
@ 2010-07-29 17:31         ` Joel James Adamson
  2010-07-29 18:43           ` Thien-Thi Nguyen
  0 siblings, 1 reply; 34+ messages in thread
From: Joel James Adamson @ 2010-07-29 17:31 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

Thien-Thi Nguyen <ttn@gnuvola.org> writes:

> () Joel James Adamson <adamsonj@email.unc.edu>
> () Thu, 29 Jul 2010 10:52:25 -0400
>
>    I would definitely work on that (if you're inviting me).
>
> If All Goes Well (i.e., Mike Gran makes a repo public under nice
> license and you finangle a savannah account in the near future),
> then consider yourself invited!

I'm already there[1].  I have a C library[2] there and I plan on adding
Guile bindings for it[3].

To Mike: if you haven't submitted a project yet, the only tricky part is
making sure you have proper copyright notices in all your files[4].  I
really like the Savannah issue tracker system, plus all the other
infrastructure (mailing lists, etc).  It's all pretty easy to use.

Joel

Footnotes: 
[1]  https://savannah.nongnu.org/users/trashbird1240

[2]  http://haploid.nongnu.org

[3]  https://savannah.nongnu.org/task/?10528

[4]  http://savannah.gnu.org/maintenance/HowToGetYourProjectApprovedQuickly

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-29 15:14             ` Thien-Thi Nguyen
@ 2010-07-29 17:34               ` Joel James Adamson
  0 siblings, 0 replies; 34+ messages in thread
From: Joel James Adamson @ 2010-07-29 17:34 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 899 bytes --]

Thien-Thi Nguyen <ttn@gnuvola.org> writes:

> () Joel James Adamson <adamsonj@email.unc.edu>
> () Thu, 29 Jul 2010 10:59:33 -0400
>
>    A small C program could act as a daemon that feeds instructions to
>    GNUPLOT through a pipe, but the daemon could be accessed through a
>    socket.
>
> This sounds like a good idea to me.  There is no need for C, however
> (presuming high performance is not a requirement); Guile has all the
> facilities for writing (proxy or otherwise) daemons.

Good to know.  I forgot to mention that one of the reasons I decided to
come back to Guile (from Python) was that i noticed all the POSIX
system-related stuff in the manual and thought this manipulation of
gnuplot/libplot might be possible.

Thanks,

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-29 17:31         ` Joel James Adamson
@ 2010-07-29 18:43           ` Thien-Thi Nguyen
  0 siblings, 0 replies; 34+ messages in thread
From: Thien-Thi Nguyen @ 2010-07-29 18:43 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

() Joel James Adamson <adamsonj@email.unc.edu>
() Thu, 29 Jul 2010 13:31:29 -0400

   I'm already there[1].  I have a C library[2] there
   and I plan on adding Guile bindings for it[3].

Cool.  Let's see what Mike Gran has to say.



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 17:54   ` Joel James Adamson
  2010-07-28 18:26     ` Linas Vepstas
  2010-07-28 18:45     ` Hans Aberg
@ 2010-07-29 18:57     ` Neil Jerram
  2 siblings, 0 replies; 34+ messages in thread
From: Neil Jerram @ 2010-07-29 18:57 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

Joel James Adamson <adamsonj@email.unc.edu> writes:

> So would I write a C program to handle the IPC between guile and
> GNUPLOT, and then control it with Scheme?

There's no need to use C here.  You can generate the data, and pass it
to Gnuplot, all in Scheme.  For example, see:

http://ossau.homelinux.net:8000/~neil/graph-benchmark-results
http://ossau.homelinux.net:8000/~neil/ossau/gnuplot.scm

(which is the code that generates the performance tracking graphs at
http://ossau.homelinux.net:8000/~neil).

Regards,
      Neil



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-29  7:01   ` Thien-Thi Nguyen
  2010-07-29 14:52     ` Joel James Adamson
@ 2010-07-30  2:40     ` Mike Gran
  2010-07-30 12:19       ` Thien-Thi Nguyen
  1 sibling, 1 reply; 34+ messages in thread
From: Mike Gran @ 2010-07-30  2:40 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: guile-user

> From: Thien-Thi Nguyen <ttn@gnuvola.org>


> I recently (last few months) got some practice adding Guile-foo  projects
> to Savannah.  Although not difficult, it is admittedly a little  tedious.
> If you send me the repo, i could set up "Guile Plot Utilities"  (project
> name "guile-plotutils") with you and me as co-admins (presuming you  get
> a Savannah account at some point).  This would be "non-GNU" for  now.
> WDYT?

Sounds like fun.  I have a Savannah account already.

With plotutils, I've got two subprojects.

Plotutils's libplot contains drawing primitives.  A very rough
implementation might look like http://lonelycactus.com/code/guile-libplot.tar

More interesting is Plotutils Graph program.  I'd need a few days to 
scrub my work before I'd let anyone see it, but, basically I've taken
Graph, made it into a library, and replaced the file reading with
reading from Guile f64vectors.  

All this would have to have the same license as Graph, which is GPL 2+.

-Mike Gran




^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-30  2:40     ` Mike Gran
@ 2010-07-30 12:19       ` Thien-Thi Nguyen
  2010-08-03 13:46         ` Mike Gran
  0 siblings, 1 reply; 34+ messages in thread
From: Thien-Thi Nguyen @ 2010-07-30 12:19 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user

() Mike Gran <spk121@yahoo.com>
() Thu, 29 Jul 2010 19:40:31 -0700 (PDT)

   With plotutils, I've got two subprojects.

   Plotutils's libplot contains drawing primitives.  A very rough
   implementation might look like http://lonelycactus.com/code/guile-libplot.tar

Hmm, graph.scm in that tarball seems to be corrupted; it
starts with ‘(define-module (graph) ...)’ and ends with C code!
(But i get the idea, anyway.)

   More interesting is Plotutils Graph program.  I'd need a few days to 
   scrub my work before I'd let anyone see it, but, basically I've taken
   Graph, made it into a library, and replaced the file reading with
   reading from Guile f64vectors.  

Perhaps both low-level (libplot) and high-level (libgraph) can be provided
as (plotutils plot) and (plotutils graph).

   All this would have to have the same license as Graph, which is GPL 2+.

Cool.  Let me know what i can do to help get it onto Savannah.



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-30 12:19       ` Thien-Thi Nguyen
@ 2010-08-03 13:46         ` Mike Gran
  2010-08-03 19:20           ` Thien-Thi Nguyen
  0 siblings, 1 reply; 34+ messages in thread
From: Mike Gran @ 2010-08-03 13:46 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: guile-user

> From: Thien-Thi Nguyen <ttn@gnuvola.org>


> Cool.  Let me know what i can do to help get it  onto Savannah.

I talked to the plotutils maintainer over on the bug-plotutils list.
He expressed some interest in folding any bindings into the upstream
plotutils tree.  This is great for me, because the problem with the
graph bindings is that I am building them in the plotutils tree, and
it saves me the problem of trying to extract them, which has been
the hangup.

I'll throw up the code somewhere temporary but hackable, like github,
tomorrow.

-Mike




^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-08-03 13:46         ` Mike Gran
@ 2010-08-03 19:20           ` Thien-Thi Nguyen
  2010-08-04  5:14             ` Mike Gran
  0 siblings, 1 reply; 34+ messages in thread
From: Thien-Thi Nguyen @ 2010-08-03 19:20 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user

() Mike Gran <spk121@yahoo.com>
() Tue, 3 Aug 2010 06:46:36 -0700 (PDT)

   I talked to the plotutils maintainer over on the bug-plotutils list.
   He expressed some interest in folding any bindings into the upstream
   plotutils tree.  This is great for me, because the problem with the
   graph bindings is that I am building them in the plotutils tree, and
   it saves me the problem of trying to extract them, which has been
   the hangup.

Cool.  It's nice to see this kind of collaboration.  I'll be sure to
include some "not immediately useful; wait for plotutils x.y.z" blurb
in the README, unless you beat me to it.

   I'll throw up the code somewhere temporary but hackable, like github,
   tomorrow.

Can't wait...



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-08-03 19:20           ` Thien-Thi Nguyen
@ 2010-08-04  5:14             ` Mike Gran
  2010-08-04 13:12               ` Joel James Adamson
  0 siblings, 1 reply; 34+ messages in thread
From: Mike Gran @ 2010-08-04  5:14 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: guile-user

>>    I'll throw up the code somewhere temporary but  hackable, like github,

>>    tomorrow.
> 
> Can't wait...
>

It is at http://github.com/spk121/guile-plotutils

We're probably boring the guile-users lists at this point, so you could
mail me directly, if you so choose.

-Mike




^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-08-04  5:14             ` Mike Gran
@ 2010-08-04 13:12               ` Joel James Adamson
  2010-08-04 13:51                 ` Mike Gran
  0 siblings, 1 reply; 34+ messages in thread
From: Joel James Adamson @ 2010-08-04 13:12 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user, Thien-Thi Nguyen

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

Mike Gran <spk121@yahoo.com> writes:

>>>    I'll throw up the code somewhere temporary but  hackable, like github,
>
>>>    tomorrow.
>> 
>> Can't wait...
>>
>
> It is at http://github.com/spk121/guile-plotutils
>
> We're probably boring the guile-users lists at this point, so you could
> mail me directly, if you so choose.

Can we set up something on github?  As soon as it's ready for Savannah
we can have a mailing list there.

Joel
-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-08-04 13:12               ` Joel James Adamson
@ 2010-08-04 13:51                 ` Mike Gran
  2010-08-04 15:21                   ` Joel James Adamson
                                     ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Mike Gran @ 2010-08-04 13:51 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user, Thien-Thi Nguyen

> From: Joel James Adamson <adamsonj@email.unc.edu>
>> Mike Gran <spk121@yahoo.com> writes:
> 

> >
> > It is at http://github.com/spk121/guile-plotutils

> 
> Can we set up something on github?  As soon as it's ready for Savannah
> we can have a mailing list there.
> 
> Joel

I made a space for it on github at http://github.com/spk121/guile-plotutils
My rough code is in there under the 'guile' directory.  It should be visible
now.  It works for me.

I'm not sure about setting up its own project on Savannah because I think
I can get it included in the main GNU Plotutils package, instead of making
its own separate formal GNU Guile-Plotutils project.  Philosophically,
Savannah doesn't seem to be the place for temporary disposable projects.

(I'm not opposed to putting it on Savannah, though.  I just don't want 
to clutter it up.  But maybe I worry too much about that sort of thing.)

I think if you make an account at github, I just add you to the repo, and you
can hack the code and the wiki as you like.  And when we have something
clean, we can submit it to the GNU Plotutils maintainer for possible
inclusion.

-Mike



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-08-04 13:51                 ` Mike Gran
@ 2010-08-04 15:21                   ` Joel James Adamson
  2010-08-04 19:51                   ` Thien-Thi Nguyen
  2010-08-15 22:49                   ` Ludovic Courtès
  2 siblings, 0 replies; 34+ messages in thread
From: Joel James Adamson @ 2010-08-04 15:21 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user, Thien-Thi Nguyen

[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]

Mike Gran <spk121@yahoo.com> writes:

>> From: Joel James Adamson <adamsonj@email.unc.edu>
>>> Mike Gran <spk121@yahoo.com> writes:
>> 
>
>> >
>> > It is at http://github.com/spk121/guile-plotutils
>
>> 
>> Can we set up something on github?  As soon as it's ready for Savannah
>> we can have a mailing list there.
>> 
>> Joel
>
> I made a space for it on github at http://github.com/spk121/guile-plotutils
> My rough code is in there under the 'guile' directory.  It should be visible
> now.  It works for me.

Yeah, I can see it.  By "set something up" I meant making a mailing list
From github.

> I'm not sure about setting up its own project on Savannah because I think
> I can get it included in the main GNU Plotutils package, instead of making
> its own separate formal GNU Guile-Plotutils project.  Philosophically,
> Savannah doesn't seem to be the place for temporary disposable projects.

Right, that makes sense to me.

Thanks,

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-08-04 13:51                 ` Mike Gran
  2010-08-04 15:21                   ` Joel James Adamson
@ 2010-08-04 19:51                   ` Thien-Thi Nguyen
  2010-08-15 22:49                   ` Ludovic Courtès
  2 siblings, 0 replies; 34+ messages in thread
From: Thien-Thi Nguyen @ 2010-08-04 19:51 UTC (permalink / raw)
  To: guile-user

() Mike Gran <spk121@yahoo.com>
() Wed, 4 Aug 2010 06:51:26 -0700 (PDT)

   I made a space for it on github at http://github.com/spk121/guile-plotutils
   My rough code is in there under the 'guile' directory.  It should be visible
   now.  It works for me.

   I'm not sure about setting up its own project on Savannah because I think
   I can get it included in the main GNU Plotutils package, instead of making
   its own separate formal GNU Guile-Plotutils project.  Philosophically,
   Savannah doesn't seem to be the place for temporary disposable projects.

   (I'm not opposed to putting it on Savannah, though.  I just don't want 
   to clutter it up.  But maybe I worry too much about that sort of thing.)

   I think if you make an account at github, I just add you to the repo, and
   you can hack the code and the wiki as you like.  And when we have something
   clean, we can submit it to the GNU Plotutils maintainer for possible
   inclusion.

Sounds like github is as good a temporary space as any; there is no need for
Savannah hosting after all.  I hereby withdraw that proposal (and bow out of
the project).  Good luck to those going forward.



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-08-04 13:51                 ` Mike Gran
  2010-08-04 15:21                   ` Joel James Adamson
  2010-08-04 19:51                   ` Thien-Thi Nguyen
@ 2010-08-15 22:49                   ` Ludovic Courtès
  2 siblings, 0 replies; 34+ messages in thread
From: Ludovic Courtès @ 2010-08-15 22:49 UTC (permalink / raw)
  To: guile-user

Hi!

Mike Gran <spk121@yahoo.com> writes:

> I made a space for it on github at http://github.com/spk121/guile-plotutils
> My rough code is in there under the 'guile' directory.  It should be visible
> now.  It works for me.

Excellent!  I hope it’ll make it into Plotutils.

Ludo’.




^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-07-28 15:21 Plotting in Guile Joel James Adamson
  2010-07-28 16:04 ` Hans Aberg
  2010-07-28 16:16 ` Mike Gran
@ 2010-08-18 15:37 ` Andy Wingo
  2010-08-18 17:03   ` Joel James Adamson
  2 siblings, 1 reply; 34+ messages in thread
From: Andy Wingo @ 2010-08-18 15:37 UTC (permalink / raw)
  To: Joel James Adamson; +Cc: guile-user

Hi Joel,

On Wed 28 Jul 2010 08:21, Joel James Adamson <adamsonj@email.unc.edu> writes:

> I am using Guile to iterate equations and produce trajectories from
> those iterations.  My current strategy is to redirect the stdout to a
> file and then use GNUPLOT to plot the trajectories as parametric
> plots.  However, I would like to contain everything within one program,
> to keep Makefiles simple and (ideally) only deal with one programming
> language for the project.
>
> Any suggestions on how to accomplish this?

Plotutils is going to be better, but there is also the possibility of
generating the plots directly, via cairo.

  http://wingolog.org/software/guile-charting/

Grab it from git, if you want it to work with the 1.9 series.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Plotting in Guile
  2010-08-18 15:37 ` Andy Wingo
@ 2010-08-18 17:03   ` Joel James Adamson
  0 siblings, 0 replies; 34+ messages in thread
From: Joel James Adamson @ 2010-08-18 17:03 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

Andy Wingo <wingo@pobox.com> writes:

> Hi Joel,
>
> On Wed 28 Jul 2010 08:21, Joel James Adamson <adamsonj@email.unc.edu> writes:
>
>> I am using Guile to iterate equations and produce trajectories from
>> those iterations.  My current strategy is to redirect the stdout to a
>> file and then use GNUPLOT to plot the trajectories as parametric
>> plots.  However, I would like to contain everything within one program,
>> to keep Makefiles simple and (ideally) only deal with one programming
>> language for the project.
>>
>> Any suggestions on how to accomplish this?
>
> Plotutils is going to be better, but there is also the possibility of
> generating the plots directly, via cairo.
>
>   http://wingolog.org/software/guile-charting/

This is what I was looking for.  I will check it out some more.

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2010-08-18 17:03 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28 15:21 Plotting in Guile Joel James Adamson
2010-07-28 16:04 ` Hans Aberg
2010-07-28 17:54   ` Joel James Adamson
2010-07-28 18:26     ` Linas Vepstas
2010-07-28 18:43       ` Joel James Adamson
2010-07-29  6:52         ` Thien-Thi Nguyen
2010-07-29 14:59           ` Joel James Adamson
2010-07-29 15:14             ` Thien-Thi Nguyen
2010-07-29 17:34               ` Joel James Adamson
2010-07-28 18:45     ` Hans Aberg
2010-07-28 18:50       ` Joel James Adamson
2010-07-28 20:56         ` Hans Aberg
2010-07-29 18:57     ` Neil Jerram
2010-07-28 16:16 ` Mike Gran
2010-07-28 16:56   ` Joel James Adamson
2010-07-28 17:20     ` Mike Gran
2010-07-28 17:59       ` Joel James Adamson
2010-07-29  7:01   ` Thien-Thi Nguyen
2010-07-29 14:52     ` Joel James Adamson
2010-07-29 15:21       ` Thien-Thi Nguyen
2010-07-29 17:31         ` Joel James Adamson
2010-07-29 18:43           ` Thien-Thi Nguyen
2010-07-30  2:40     ` Mike Gran
2010-07-30 12:19       ` Thien-Thi Nguyen
2010-08-03 13:46         ` Mike Gran
2010-08-03 19:20           ` Thien-Thi Nguyen
2010-08-04  5:14             ` Mike Gran
2010-08-04 13:12               ` Joel James Adamson
2010-08-04 13:51                 ` Mike Gran
2010-08-04 15:21                   ` Joel James Adamson
2010-08-04 19:51                   ` Thien-Thi Nguyen
2010-08-15 22:49                   ` Ludovic Courtès
2010-08-18 15:37 ` Andy Wingo
2010-08-18 17:03   ` Joel James Adamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).