On Saturday, February 10, 2018 at 10:00:29 AM UTC+8, Evan Whitmer wrote:
> Do you anticipate this playing well with charts that have multiple Y 
> values for a given X value. For example, candlestick plotting 
> <https://github.com/racket/plot/blob/9c8960d40772cc61211ff5d9ab185f9cf931b044/plot-lib/plot/private/plot2d/point.rkt#L254>
> has recently landed in racket/plot. It would be great to be able to show 
> all of the values, or at least specify which of the open/high/low/close 
> values to display.
> Evan
Yes.  The way this is implemented is that you will need to add a callback 
to the returned plot and from the callback add as many overlays as you 
want, where you want them (not necessarily at the X location). The 
advantage of this method is that you can display any value you want on the 
overlay, not just simply the value of the plotted function at the current 
location.  The disadvantage is that the feature is not 'free", like the 
zoom-unzoom functionality: the user has to add the callback and provide the 

In my case, most of the interesting use cases do not involve simply showing 
the value of a function at the current location.  I put some examples here: 

I have not looked at candlestick plots, however, I imagine that you can 
work out what the current value is from the X position and show the 
open/low/high/close values either as a single badge or as markers on the 
relevant positions of the candlestick.

Best Regards,


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

Reply via email to