Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Dialect: graphics for Charts, Diagrams, Graphing ?

From: carl:cybercraft at: 17-Nov-2001 11:56

On 17-Nov-01, Donald Dalley wrote:
> hello, REBOLs: > Has anyone made a View graphics dialect, one useful enough to do > easy charting or graphs? I checked the site, but I didn't find > anything there.
View comes with a Draw dialect - see info about it via the Desktop on RT's Rebsite - in the Docs section.
> In the meantime, can anyone suggest how to do simple bar charts of > percentages?
Here a quick example. Could obviously be shorter, (lots of cuts ands pastes:), but it should put you on the right track... REBOL [] view layout [ bar-chart: box white 100x100 effect [ draw [ pen black fill-pen red box 0x90 9x99 fill-pen blue box 10x90 19x99 fill-pen red box 20x90 29x99 fill-pen blue box 30x90 39x99 fill-pen red box 40x90 49x99 fill-pen blue box 50x90 59x99 fill-pen red box 60x90 69x99 fill-pen blue box 70x90 79x99 fill-pen red box 80x90 89x99 fill-pen blue box 90x90 99x99 ] ] button "Change Sizes" [ bars-blk: next next bar-chart/effect/draw forskip bars-blk 5 [ bars-blk/4/2: (random 100 - 1) ] show bar-chart ] button "Change Colours" [ bars-blk: next next bar-chart/effect/draw forskip bars-blk 5 [ bars-blk/2: random 255.255.255 ] show bar-chart ] ]
> Can RT do a graphing tutorial? > Thank you, > Donald
-- Carl Read