---Oleg Kobchenko wrote:
> > From: "Hahn, Harvey" <[EMAIL PROTECTED]>
> > Oleg Kobchenko
> > |As in existing error bar and high-low types, I believe the
> > |ticks should be drawn geometrically rather than placed as glyphs.
> >
> That makes far more sense for the general case with
> resizability.
> Since this thread interests me greatly, do you
> have any suggestions about how one goes about drawing these things
> geometrically?  (Obviously, stock market charting software
> must do it this way.)  Thanks!

I had come to the same conclusion re geometrically drawn shapes. Symbols for 
the marker plot type are drawn geometrically, so I defined two new markers 
"lineleft" and "lineright" in jzplot & used a marker rather than an symbol plot 
type. That resulted in a nice, clean, accurate result although does not yet 
differentiate open>close or open<close using colour as Devon wished.

plot_ohlc3=: 3 : 0
 ''plot_ohlc3 y
:
 hl=. 1 2{y
 oc=. 0 3{y
 ntics=. {:$hl
 pd 'reset'
 pd 'xticpos ',": i.ntics
 pd 'pensize 3'
 pd 'markersize 2'
 pd x
 pd 'color green,red'
 pd 'type marker'
 pd 'markers leftline,rightline'
 pd oc
 pd 'color blue'
 pd 'type hilo'
 pd hl
 pd 'show'
)

The isigraph definitions I used for drawing lineleft & lineright are as follows:

isimark_lineleft=: 4 : 0
s=. rndint 4 1 * x
p=. (y -"1 s) ,"1 s
gpbuf ,gpcount 2031 ,"1 p
)

isimark_lineright=: 4 : 0
s=. rndint 4 1 * x
p=. (y -"1 s * 0 1) ,"1 s
gpbuf ,gpcount 2031 ,"1 p
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to