Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] Plot(1) broken on p9p OSX?

30 views
Skip to first unread message

marius a. eriksen

unread,
Apr 19, 2013, 5:23:05 PM4/19/13
to
Graph(1) seems to work:

% @{echo 1; echo 2; echo 3} | graph -a
o
ra 0 0 4096 4096
e
li 200 200 4000 200
v 4000 4000
v 200 4000
v 200 200
li 1150 200 1150 4000
li 2100 200 2100 4000
li 3050 200 3050 4000
li 200 1150 4000 1150
li 200 2100 4000 2100
li 200 3050 4000 3050
m 200 140
t " 0 <= x <= 2, 1 <= y <= 3"
pe solid
co kblack
m 200 200
v 2100 2100
v 4000 4000
pe solid
cl

But not plot(1):

% @{echo 1; echo 2; echo 3} | graph -a | plot

Yields only a lonely, blank window.

Has anyone gotten this to work?

-marius

marius a. eriksen

unread,
Apr 19, 2013, 7:33:58 PM4/19/13
to
Interesting. Which version of OSX is this? I'm running Mountain Lion.

-marius

Skip Tavakkolian

unread,
Apr 19, 2013, 7:55:49 PM4/19/13
to
Ditto.

Jeff Sickel

unread,
Apr 19, 2013, 8:20:48 PM4/19/13
to
I'm on 10.8.3 and I see the grey screen w/ no plot.

Skip's still on that "Blue" Quartz UI setting, the stop light colors on the window buttons give it away, so he may not have done a full rebuild of p9p in a while. I can't get all of p9p to compile on 10.8, that mean's there are likely a few bits missing that never made it forward from my pre 10.7 builds.

I've tried forcing a flush image in during the event loop and after resizing the window. All that does is give a clean white background that didn't use to exist. Still no real plot info.

To get around the drawing problems I always went w/ grap | pic | troff | tr2post | psfonts > t.ps.

-jas

Skip Tavakkolian

unread,
Apr 19, 2013, 9:37:33 PM4/19/13
to
right... uname says, 10.7.5 -- which i can see now is a Lion, but not of the Mountains 

Nicolas Bercher

unread,
Apr 20, 2013, 4:00:22 AM4/20/13
to
On 19/04/2013 23:23, marius a. eriksen wrote:
> % @{echo 1; echo 2; echo 3} | graph -a | plot
>
> Yields only a lonely, blank window.

Using drawterm connected to a native Plan 9, it's working
but if I drag the window, the plot disappears (the window
becomes blank).

Nicolas

Jeff Sickel

unread,
Apr 20, 2013, 2:24:42 PM4/20/13
to
Plot doesn't have any redraw in eresized(). It would need to redraw
the screen and reprocess the data for the new size. Fixing this
would probably fix devdraw cocoa versions as well and enable the
server option.

This could be why devdraw on Mountain Lion also ends up with a
blank screen.

-jas

erik quanstrom

unread,
Apr 21, 2013, 11:58:08 PM4/21/13
to
On Sat Apr 20 14:25:53 EDT 2013, j...@corpus-callosum.com wrote:
> Plot doesn't have any redraw in eresized(). It would need to redraw
> the screen and reprocess the data for the new size.

yes. this is a problem for plan 9. you cannot move or hide the plot
window. imho this is pretty antisocial.

i've attached a version that always uses the double-buffer buffer
to allow for resize events. double-buffering now only prevents
the draw from going directly to the screen. it is also possible to
select exit from the menu before the input is exhausted. for
programs like mapdemo, this is important.

a better solution would be to additionally save all the draw commands
(between clears) and if the screen size has changed, recompute. otherwise
if redrawing is necessary, the double-buffer buffer can be reused.

unfortunately, i'm too lazy for that.

> Fixing this
> would probably fix devdraw cocoa versions as well and enable the
> server option.
>
> This could be why devdraw on Mountain Lion also ends up with a
> blank screen.

it would seem that mountain lion devdraw has a bug. devdraw should not
send a resize event until there is a, er, resize event. this spurious
event is an error.

- erik
plotdiff

erik quanstrom

unread,
Apr 22, 2013, 12:17:02 AM4/22/13
to
also, /n/sources/patch/plotresize

- erik

0 new messages