Graphics

20 views
Skip to first unread message

Andrew Dabrowski

unread,
Jan 11, 2018, 12:06:18 PM1/11/18
to pure-lang
In the hope that I wouldn't have to read the entire 700+ page OpenGL manual I tried the running the flexi-line-auto.pure demo mentioned at https://agraef.github.io/pure-docs/pure-gl.html.  I ran

pure flexi-line-auto.pure

and absolutely nothing happened: the command exited without errors and without producing any graphics.  Any ideas?

I'll also note that on the page

https://agraef.github.io/pure-docs/#gui-and-graphics

the link to the pure-g2 website is broken.

What I would like to do is make simple images from matrices, along the lines of Mathematica's ArrayPlot  command.  Are there any examples in Pure I might find helpful?

Andrew Dabrowski

unread,
Jan 11, 2018, 1:43:07 PM1/11/18
to pure-lang
Sorry, I should have said the link on

https://agraef.github.io/pure-docs/pure-g2.html

to http://g2.sf.net/ is broken.

Albert Graef

unread,
Jan 11, 2018, 8:04:24 PM1/11/18
to pure...@googlegroups.com
On Thu, Jan 11, 2018 at 6:06 PM, Andrew Dabrowski <unhan...@gmail.com> wrote:
In the hope that I wouldn't have to read the entire 700+ page OpenGL manual I tried the running the flexi-line-auto.pure demo mentioned at https://agraef.github.io/pure-docs/pure-gl.html.  I ran

pure flexi-line-auto.pure

and absolutely nothing happened: the command exited without errors and without producing any graphics.  Any ideas?

Click somewhere in the OpenGL window. :)

What I would like to do is make simple images from matrices, along the lines of Mathematica's ArrayPlot  command.  Are there any examples in Pure I might find helpful?

Have you tried pure-gplot? https://github.com/agraef/pure-lang/tree/master/pure-gplot Example: gplot_test.pure

There's also a more elaborate interface to gnuplot via octave: https://github.com/agraef/pure-lang/tree/master/pure-octave Example: plot_demo.pure

Caveat: The Octave embed interface used by pure-octave is completely broken in Octave 4.2. Use an earlier version instead. The current development version (4.3, available as octave-hg in the AUR if you're running Arch Linux) should work, too.

--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email:  agg...@gmail.com
WWW:    https://plus.google.com/+AlbertGraef

Albert Graef

unread,
Jan 11, 2018, 8:28:21 PM1/11/18
to pure...@googlegroups.com
Thanks for the heads-up, I just fixed this in the README, it will show in the online docs next time I regenerate these.

--
You received this message because you are subscribed to the Google Groups "pure-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pure-lang+unsubscribe@googlegroups.com.
To post to this group, send email to pure...@googlegroups.com.
Visit this group at https://groups.google.com/group/pure-lang.
For more options, visit https://groups.google.com/d/optout.

Andrew Dabrowski

unread,
Jan 11, 2018, 10:59:43 PM1/11/18
to pure...@googlegroups.com, Albert Graef
On 01/11/2018 08:04 PM, Albert Graef wrote:
On Thu, Jan 11, 2018 at 6:06 PM, Andrew Dabrowski <unhan...@gmail.com> wrote:
In the hope that I wouldn't have to read the entire 700+ page OpenGL manual I tried the running the flexi-line-auto.pure demo mentioned at https://agraef.github.io/pure-docs/pure-gl.html.  I ran

pure flexi-line-auto.pure

and absolutely nothing happened: the command exited without errors and without producing any graphics.  Any ideas?

There is no such window visible.

Click somewhere in the OpenGL window. :)

What I would like to do is make simple images from matrices, along the lines of Mathematica's ArrayPlot  command.  Are there any examples in Pure I might find helpful?

Have you tried pure-gplot? https://github.com/agraef/pure-lang/tree/master/pure-gplot Example: gplot_test.pure
I can't get it to work. the gplot command I need is

plot <data> matrix with image

So with my matrix in the variable mat, I run:

> let gp = gplot::open "gnuplot";
> gplot::plot gp mat matrix with image;
<stdin>, line 49: syntax error, unexpected ';', expecting '=' or '|'

Maybe some of the command has to be quoted?

> gplot::plot gp mat "matrix with image";
()
> 
gnuplot> e
         ^
         line 0: invalid command

It doesn't help that the usage notes at

https://github.com/agraef/pure-lang/blob/master/pure-gplot/gplot.pure

are truncated on the right.




There's also a more elaborate interface to gnuplot via octave: https://github.com/agraef/pure-lang/tree/master/pure-octave Example: plot_demo.pure

Caveat: The Octave embed interface used by pure-octave is completely broken in Octave 4.2. Use an earlier version instead. The current development version (4.3, available as octave-hg in the AUR if you're running Arch Linux) should work, too.

--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email:  agg...@gmail.com
WWW:    https://plus.google.com/+AlbertGraef
--
You received this message because you are subscribed to a topic in the Google Groups "pure-lang" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pure-lang/vlsBeUZ-uPw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pure-lang+...@googlegroups.com.

Albert Graef

unread,
Jan 12, 2018, 3:24:49 PM1/12/18
to pure...@googlegroups.com
On Fri, Jan 12, 2018 at 4:59 AM, Andrew Dabrowski <unhan...@gmail.com> wrote:
There is no such window visible.

Works fine over here on Linux. What about the teapot.pure example? If that doesn't map a window either then something's wrong -- please submit a bug report with all the requisite information.

Maybe some of the command has to be quoted?

Yes, basically everything that comes after "plot" AFAICT. But I didn't write the thing, so I'm not sure how it works. Kay-Uwe Kirstein, still lurking here? Can you help?

It doesn't help that the usage notes at

https://github.com/agraef/pure-lang/blob/master/pure-gplot/gplot.pure

are truncated on the right.


Pull requests are appreciated.

Albert
Reply all
Reply to author
Forward
0 new messages