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

Plotting Dialect and Docs Available

 [1/14] from: lcdr:licholai:msc:navy:mil at: 23-Jan-2002 16:50


Hello, About a month ago there was some discussion on this list of plotting using REBOL. Although it is easy to create drawings and plots using view, there was no quick and reusable tool given for incorporating plotting into short scripts. I expect that most people who have been using REBOL for any length of time have plotting library of their own, however, those just starting with REBOL or only occasionally needing a simple plotting solution may find my quick-plot dialect helpful. Since it is intended for less experienced as well as regular REBOL users, I have also provided (what I hope is an easy to use) script of documentation and examples. I welcome any and all feedback on the utility, concept, or implementation of the quick-plot dialect. Not being a professional programmer and relatively new to REBOL, I look forward to your informative and interesting comments and critiques. The quick-plot dialect is available via reb/web at http://www.reboltech.com/library/scripts/q-plot.r <http://www.reboltech.com/library/scripts/q-plot.r> The documentation and some usable examples (in the style of easy-draw) are at http://www.reboltech.com/library/scripts/ez-plot.r <http://www.reboltech.com/library/scripts/ez-plot.r> In order to try all the examples (stock ohlc plots in particular) the following script is also needed http://www.reboltech.com/library/scripts/get-stock.r <http://www.reboltech.com/library/scripts/get-stock.r> Since the three scripts make for a rather long email, I am not including them in this post. If anyone desires, however, I can send them separately. Thank You, Matt Licholai [m--s--licholai--ieee--org] <mailto:[m--s--licholai--ieee--org]>

 [2/14] from: brett:codeconscious at: 23-Jan-2002 20:08


Hi Matt, Awesome! :) Brett. ----- Original Message ----- From: "Licholai, LCDR" <[LCDR--Licholai--msc--navy--mil]> To: <[rebol-list--rebol--com]> Cc: <[m--s--licholai--ieee--org]>

 [3/14] from: rebol665:ifrance at: 23-Jan-2002 13:25


Hi, Matt Great stuff ! And with the VID style documentation, it seems very easy to learn. Patrick ----- Original Message ----- From: "Licholai, LCDR" <[LCDR--Licholai--msc--navy--mil]> To: <[rebol-list--rebol--com]> Cc: <[m--s--licholai--ieee--org]>

 [4/14] from: philb:upnaway at: 23-Jan-2002 20:54


Hi Matt, This is really good stuff .... Cheers Phil === Original Message === Hi Matt, Awesome! :) Brett. ----- Original Message ----- From: "Licholai, LCDR" <[LCDR--Licholai--msc--navy--mil]> To: <[rebol-list--rebol--com]> Cc: <[m--s--licholai--ieee--org]>

 [5/14] from: greggirwin:mindspring at: 23-Jan-2002 9:59


Thanks Matt!

 [6/14] from: jason:cunliffe:verizon at: 23-Jan-2002 10:14


----- Original Message ----- From: "Licholai, LCDR" <[LCDR--Licholai--msc--navy--mil]> To: <[rebol-list--rebol--com]> Cc: <[m--s--licholai--ieee--org]> Sent: Wednesday, January 23, 2002 2:50 AM Subject: [REBOL] Plotting Dialect and Docs Available Wonderful! Thank you very much.. When I click "save image" button on your very last example, it returns this error:
>> do %ez-plot.r
** Script Error: request-file has no refinement called only ** Where: func [face value][save/png request-file/only/filter 'png to-image top-pane] ** Near: save/png request-file/only/filter 'png to-image top-pane Are you using a customized request-file ? thanks ./Jason

 [7/14] from: ddalley:idirect at: 23-Jan-2002 17:00


Hello, Matt: ----- Original Message ----- From: "Licholai, LCDR" <[LCDR--Licholai--msc--navy--mil]> Subject: [REBOL] Plotting Dialect and Docs Available
> About a month ago there was some discussion on this list of plotting using > REBOL.
Yes, I started the thread.
> I expect that most people who have been using REBOL for any length of time > have plotting library of their own
I like your sense of humour. <g> * 100
> however, those just starting with REBOL > or only occasionally needing a simple plotting solution may find my > quick-plot dialect helpful.
You go that right.
> Since it is intended for less experienced as > well as regular REBOL users, I have also provided (what I hope is an easy
to
> use) script of documentation and examples. > Not being a professional programmer and relatively > new to REBOL, I look forward to your informative and interesting comments > and critiques.
I am impressed with the quality of your work and what was accomplished, by a non-pro, in that short amount of time.
> I welcome any and all feedback on the utility, concept, or implementation
of
> the quick-plot dialect.
I am still not sure what happened when I entered the q-plot.r address into GOTO. While the desktop was "connected", the R logo cycled, but nothing else seemed to happen. The file may have d/led somewhere, but I got no indication of that.
> The quick-plot dialect is available via reb/web at > http://www.reboltech.com/library/scripts/q-plot.r > The documentation and some usable examples (in the style of easy-draw)
The docs & examples look great. I must learn how to put docs together like this. Some examples have a small problem, though. A few bars are plotted beyond the edge of the window or overlap other bars.
> In order to try all the examples (stock ohlc plots in particular) the > following script is also needed > http://www.reboltech.com/library/scripts/get-stock.r
I had a similar problem getting this file, too. There was desktop activity, but nothing opened. I'll have to check some REBOL directories, in the meantime. I checked the main script library, but it was not listed there, AFAIK. I am busy with some other projects, but I will get back to plotting, ASAP, now that I have a tool. Stock candlesticks are most interesting to me, but other plot styles are also needed. I look forward to using your dialect. In the meantime, if you could enlighten me as to how to get get-stock.r & q-plot.r or just send me the files, I'd appreciate it. Thanks for your considerable efforts, Donald Dalley

 [8/14] from: lcdr:licholai:msc:navy:mil at: 24-Jan-2002 12:42


Donald, Thank you for your comments and encouragement. In the bar chart section the final example is intended to show using a bar-width greater than the plot width divided by the number of bars. This is in contrast to the second example which shows thin bars. The width of the bars is completely controllable by use of the 'bar-width keyword (defaults to each bar just touching its neighbor). The bars on either end of the chart are displayed "falling off the edges" by design. However, now that I think about it some more, it doesn't seem like an intuitive or useful feature of a bar graph. I'll change it in the next version. I do not have a web site of my own and was using the script library at reboltech to hold the files. I will check to see if there is a problem downloading them. Also, I have attached copies of the files to this note. The %q-plot.r and %get-stock.r files consist only of function definitions, they do not generate any output on their own. Using Rebol/View/Desktop to get the files simply places them in the %public/www.reboltech.com/library/scripts subdirectory off of your main Rebol/view directory. The file %q-plot.r contains the actual quick-plot dialect and %get-stock.r contains a function to download stock market quotes from <http://www.yahoo.com> www.yahoo.com. The two scripts are intended to be used a part of a library for building useful applications. I believe this might be the reason you not seeing any output when using desktop to get the two files. Thank You, Matt

 [9/14] from: chalz:earthlink at: 24-Jan-2002 2:59


Well, that's cool. The list management software @rebol.com seemed to feel that .r files are binary when attached. ;) But then, I recall being told by someone @rebol.com that the .com site is hosted by someone else entirely anyways, and they even have .pl scripts on that site because of it. Heh. (Course, that was a while ago.)

 [10/14] from: lcdr:licholai:msc:navy:mil at: 24-Jan-2002 17:38


Jason, I did not modify any of the rebol built-in functions (mezzanine functions). I am using REBOL/View 1.2.1.3.1 of 21-Jun-2001 and have /only as a standard refinement to request-file. Here is what I get for help request-file: USAGE: REQUEST-FILE /title title-line button-text /file name /filter filt /keep /only /path DESCRIPTION: Requests a file using a popup list of files and directories. REQUEST-FILE is a function value. REFINEMENTS: /title -- Change heading on request. title-line -- Title line of request (Type: any) button-text -- Button text for selection (Type: any) /file name -- Default file name or block of file names (Type: any) /filter filt -- Filter or block of filters (Type: any) /keep -- Keep previous settings and results /only -- Return only a single file, not a block. /path -- Return absolute path followed by relative files. I'm not sure what is causing the error you describe. Thanks, Matt

 [11/14] from: brett:codeconscious at: 24-Jan-2002 20:04


Hi Charles,
> Well, that's cool. The list management software @rebol.com seemed to > feel that .r files are binary when attached. ;) But then, I recall being
Actually I believe it is the email client software used to send the message that decides what is text and what is binary.
> > -- Type: application/octet-stream
To any mime based email client that line equates to "Binary". So Liststar sees that and goes <strip!>. Just to prove it (well test it anyway) I've attached a single line text file to this message. Let's see what happens. :) Cheers Brett. -- Attached file included as plaintext by Listar -- -- File: example-attachment.txt A text file.

 [12/14] from: sunandadh:aol at: 24-Jan-2002 4:33


> I did not modify any of the rebol built-in functions (mezzanine functions). > I am using REBOL/View 1.2.1.3.1 of 21-Jun-2001 and have /only as a standard > refinement to request-file. Here is what I get for help request-file:
I hot the same problem once. /Only appeared as a refinement in 1.2.1.3.1 If you are running 1.2.0.3.1, it doesn't work. (version numbers approximate from memory, but you get the idea. Upgrade to the most recent to clear this problem), Sunanda.

 [13/14] from: holger:rebol at: 24-Jan-2002 9:33


On Thu, Jan 24, 2002 at 02:59:32AM -0500, Charles wrote:
> Well, that's cool. The list management software @rebol.com seemed to > feel that .r files are binary when attached. ;) But then, I recall being
<<quoted lines omitted: 4>>
> > -- Type: application/octet-stream > > -- File: ez-plot.r
A few corrections: First of all, the "application/octet-stream" MIME type was chosen by your email software, not by our list software :). Listar, the list processor we use, is set up to filter out binary attachments, and application/octet-stream is definitely binary, so the files were filtered out as they should have been. If you want to post REBOL scripts to the list (SHORT ones only, please), then you can do one of three things: - include them inline, i.e. not as an attachment - add them as an attachment of MIME type "text/plain" - add them as an attachment of MIME type "text/x-rebol" As to the .com site and .pl scripts: our rebol.com site is hosted by Earthlink and indeed uses some .pl scripts. This does not affect email in any way though. All email to rebol.com is forwarded to rebol.net (our in-office network), and .pl scripts never touch those mails :). All of our email processing is done by Listar (written in C) and REBOL only. -- Holger Kruse [holger--rebol--com]

 [14/14] from: ddalley:postoffice:idirect at: 27-Jan-2002 22:19


Hello, Matt: I apologise for taking so long to get this out, but I actually lost my first reply. This silly keyboard design has a power On/Off key right above the cursor keys, and one small mistake can spell disaster for unsaved work. <grrr> Sent: Wednesday, January 23, 2002 10:42 PM Subject: [REBOL] Re: Plotting Dialect and Docs Available I had a quick look at the stock graphing abilities you added to your plotting dialect. Good work! Some comments, in no particular order, will follow. Please keep in mind that I have a narrow interest in plotting/graphing - stock charts and related graphing. Others may voice their own concerns.
> I do not have a web site of my own
It is easy to set up one at any of the free sites; I use grafitti.net, in Hong Kong, for my WWREB site.
> I have attached copies of the files to this note.
Thanks!
> Using Rebol/View/Desktop to get the files simply places them in the > %public/www.reboltech.com/library/scripts subdirectory off of your main > Rebol/view directory.
I figured the files went somewhere because the desktop's "R" symbol cycled, but I didn't have a clue where, until I went digging for the files. OK, let's see if I can remember what I lost. You have no XY label margins to seperate the plot data from the lables. This does not look good. Ah, I see - the lables are inside the plot area, so a way of placing them outside would fix this. Of primary importance today is the ability to use Japanese candlestick bars. These quickly and easily display emotion by using a fill colour: your standard tick bars can't do this. Is there a way to automatically find an unused area, to place text over data without messing up the line displays? Just curious... Maybe a way of adding a background colour to the text would help. For stock price charting in particular, there should be a semi-log scale available. There should be some way of controlling how many date labels get displayed, when there is a lot of data, otherwise dates overlap. The two date examples show overlapping. You have a neat feature that allows drawing on the plots. Can you make it so that we can save this new information, in some way? This would be useful to save, say, trendlines. Maybe a way of click&type (to add comments) would work, too. Is there a way to limit/scale the size of the main window? The document displayer that works with your docs does not disappear below an additional toolbar, on Windows' desktop. The plot windows, if big enough (as it is with IBM's current data), do disappear behind it. I realise it is more of an OS/REBOL thing. Without actually using your dialect, that's what first comes to mind, in the way of comments. My hands are full, for the moment, but I will get to use it, as soon as possible. Thanks for your efforts regarding this and I do hope you find these suggestions useful and practical. If I can help you in any way, please call. Donald Dalley

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted