Re: [racket-users] Adding interactive overlays to racket plots

2018-03-20 Thread Alex Harsanyi
About a month ago, the changes for the plot overlays were merged into the 
main plot repository and will be available in the next Racket release.  
Based on feedback from Ben Greenman, the implementation is different than 
my original prototype, but it is more flexible -- thanks to Ben for 
suggestions and support in getting this merged.

While the changes have not made it into a Racket release, I wrote a short 
blog post about how to implement some common plot overlay use cases, while 
the idea is still fresh in my head.  You can find it here: 
https://alex-hhh.github.io/2018/03/interactive-overlays-with-the-racket-plot-package-update.html

Best Regards,
Alex.

On Saturday, February 3, 2018 at 3:08:50 PM UTC+8, Alex Harsanyi wrote:
>
>
> Hi Matthias,
>
> I updated the plot package to cover all the cases I had in mind for plot 
> overlays and also updated my application to make use of these features, 
> just to make sure that they are adequate.
>
> The pull request is here: https://github.com/racket/plot/pull/32, it 
> would be good if I could get some feedback if my approach OK, or what needs 
> to be changed.  What is missing is the documentation, but I would like to 
> leave that until after the code is considered OK.  I wrote up some notes 
> about the API here: https://github.com/alex-hhh/plot/wiki/overlays-notes
>
> I also did a write-up of the features, as well as some screenshots to 
> illustrate what can be done with the new functionality.  You can find that 
> here: 
> https://alex-hhh.github.io/2018/02/interactive-overlays-with-the-racket-plot-package.html
>
> Best Regards,
> Alex. 
>
> On Monday, January 29, 2018 at 11:18:39 PM UTC+8, Matthias Felleisen wrote:
>
> > This is dang cool. Yes please submit a PR. 
>
>

-- 
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.


Re: [racket-users] Adding interactive overlays to racket plots

2018-02-03 Thread 'John Clements' via Racket Users
Wow. Yes please.

John

> On Jan 29, 2018, at 03:09, Alex Harsanyi  wrote:
> 
> The racket plot package produces interactive snip% objects which allow 
> zooming of the plot area. While this is a cool and sometimes useful feature, 
> the functionality is hard coded in the plot-snip% class inside the package. I 
> would like to extend the package to allow the user to customize the 
> interactive features of the plot -- most of the graphing packages for the web 
> support the display of additional information when the user hovers the mouse 
> over the plot.
> 
> I have built a prototype implementation of adding interactive overlays to 
> plot snips, as shown in the image below, and I would like to ask if there is 
> interest in adding such a feature to the plot package distributed with racket.
> 
> At this point, the code is at a "proof of concept" stage, but ultimately, I 
> will add interactive features to the plots in my application and they will be 
> more complex than just showing the value of a function at a cursor location. 
> As part of that experience, I will better understand what actual features I 
> need, and hope to refine this interface. I am also looking for feedback, in 
> particular if this would be the right approach for doing this.
> 
> The prototype implementation is here: 
> https://github.com/alex-hhh/plot/tree/ah/interactive-overlays
> 
> The code to generate the plot below is here: 
> https://gist.github.com/alex-hhh/64f8af9c4bd5b5c65ada62dd9157e938 
> 
> As it is implemented now, unless a "hover callback" is added to the plot 
> snip, the snip behaves as before, allowing zoom and unzoom when the mouse is 
> dragged over the plot area.
> 
> 
> 
> 
> 
> 
> Best Regards,
> Alex.
> 
> 
> -- 
> 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.



-- 
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.


Re: [racket-users] Adding interactive overlays to racket plots

2018-02-03 Thread Robby Findler
On Sat, Feb 3, 2018 at 1:08 AM, Alex Harsanyi  wrote:
> I also did a write-up of the features, as well as some screenshots to
> illustrate what can be done with the new functionality.  You can find that
> here:
> https://alex-hhh.github.io/2018/02/interactive-overlays-with-the-racket-plot-package.html

This is beautiful. Thank you very much!

Would you consider including that content into the docs themselves (as
examples)?

Robby

-- 
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.


Re: [racket-users] Adding interactive overlays to racket plots

2018-02-03 Thread Laurent
This is awesome! Thanks so much for doing this, I'm sure it's going to be
very handy.

On Sat, Feb 3, 2018 at 7:08 AM, Alex Harsanyi 
wrote:

>
> Hi Matthias,
>
> I updated the plot package to cover all the cases I had in mind for plot
> overlays and also updated my application to make use of these features,
> just to make sure that they are adequate.
>
> The pull request is here: https://github.com/racket/plot/pull/32, it
> would be good if I could get some feedback if my approach OK, or what needs
> to be changed.  What is missing is the documentation, but I would like to
> leave that until after the code is considered OK.  I wrote up some notes
> about the API here: https://github.com/alex-hhh/plot/wiki/overlays-notes
>
> I also did a write-up of the features, as well as some screenshots to
> illustrate what can be done with the new functionality.  You can find that
> here: https://alex-hhh.github.io/2018/02/interactive-overlays-
> with-the-racket-plot-package.html
>
> Best Regards,
> Alex.
>
> On Monday, January 29, 2018 at 11:18:39 PM UTC+8, Matthias Felleisen wrote:
>
> > This is dang cool. Yes please submit a PR.
>
> --
> 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.
>

-- 
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.


Re: [racket-users] Adding interactive overlays to racket plots

2018-02-02 Thread Alex Harsanyi

Hi Matthias,

I updated the plot package to cover all the cases I had in mind for plot 
overlays and also updated my application to make use of these features, 
just to make sure that they are adequate.

The pull request is here: https://github.com/racket/plot/pull/32, it would 
be good if I could get some feedback if my approach OK, or what needs to be 
changed.  What is missing is the documentation, but I would like to leave 
that until after the code is considered OK.  I wrote up some notes about 
the API here: https://github.com/alex-hhh/plot/wiki/overlays-notes

I also did a write-up of the features, as well as some screenshots to 
illustrate what can be done with the new functionality.  You can find that 
here: 
https://alex-hhh.github.io/2018/02/interactive-overlays-with-the-racket-plot-package.html

Best Regards,
Alex. 

On Monday, January 29, 2018 at 11:18:39 PM UTC+8, Matthias Felleisen wrote:

> This is dang cool. Yes please submit a PR. 

-- 
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.


Re: [racket-users] Adding interactive overlays to racket plots

2018-01-30 Thread Konrad Hinsen

On 29/01/2018 12:09, Alex Harsanyi wrote:

I have built a prototype implementation of adding interactive overlays 
to plot snips, as shown in the image below, and I would like to ask if 
there is interest in adding such a feature to the plot package 
distributed with racket.


Yes, definitely!

Konrad.

--
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.


Re: [racket-users] Adding interactive overlays to racket plots

2018-01-29 Thread Matthias Felleisen

This is dang cool. Yes please submit a PR. 


> On Jan 29, 2018, at 6:09 AM, Alex Harsanyi  wrote:
> 
> The racket plot package produces interactive snip% objects which allow 
> zooming of the plot area. While this is a cool and sometimes useful feature, 
> the functionality is hard coded in the plot-snip% class inside the package. I 
> would like to extend the package to allow the user to customize the 
> interactive features of the plot -- most of the graphing packages for the web 
> support the display of additional information when the user hovers the mouse 
> over the plot.
> 
> I have built a prototype implementation of adding interactive overlays to 
> plot snips, as shown in the image below, and I would like to ask if there is 
> interest in adding such a feature to the plot package distributed with racket.
> 
> At this point, the code is at a "proof of concept" stage, but ultimately, I 
> will add interactive features to the plots in my application and they will be 
> more complex than just showing the value of a function at a cursor location. 
> As part of that experience, I will better understand what actual features I 
> need, and hope to refine this interface. I am also looking for feedback, in 
> particular if this would be the right approach for doing this.
> 
> The prototype implementation is here: 
> https://github.com/alex-hhh/plot/tree/ah/interactive-overlays
> 
> The code to generate the plot below is here: 
> https://gist.github.com/alex-hhh/64f8af9c4bd5b5c65ada62dd9157e938 
> 
> As it is implemented now, unless a "hover callback" is added to the plot 
> snip, the snip behaves as before, allowing zoom and unzoom when the mouse is 
> dragged over the plot area.
> 
> 
> 
> 
> 
> 
> Best Regards,
> Alex.
> 
> 
> -- 
> 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.

-- 
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.


[racket-users] Adding interactive overlays to racket plots

2018-01-29 Thread Alex Harsanyi
The racket plot package produces interactive snip% objects which allow 
zooming of the plot area. While this is a cool and sometimes useful 
feature, the functionality is hard coded in the plot-snip% class inside the 
package. I would like to extend the package to allow the user to customize 
the interactive features of the plot -- most of the graphing packages for 
the web support the display of additional information when the user hovers 
the mouse over the plot.

I have built a prototype implementation of adding interactive overlays to 
plot snips, as shown in the image below, and I would like to ask if there 
is interest in adding such a feature to the plot package distributed with 
racket.

At this point, the code is at a "proof of concept" stage, but ultimately, I 
will add interactive features to the plots in my application and they will 
be more complex than just showing the value of a function at a cursor 
location. As part of that experience, I will better understand what actual 
features I need, and hope to refine this interface. I am also looking for 
feedback, in particular if this would be the right approach for doing this.

The prototype implementation is here: 
https://github.com/alex-hhh/plot/tree/ah/interactive-overlays

The code to generate the plot below is here: 
https://gist.github.com/alex-hhh/64f8af9c4bd5b5c65ada62dd9157e938 

As it is implemented now, unless a "hover callback" is added to the plot 
snip, the snip behaves as before, allowing zoom and unzoom when the mouse 
is dragged over the plot area.






Best Regards,
Alex.

-- 
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.