Recent meeting with Pranav

8 views
Skip to first unread message

Sameer Deshmukh

unread,
Jul 3, 2018, 11:06:41 AM7/3/18
to Pranav Garg, SciRuby Mailing List
All:

Me and Pranav had a brief chat right now and we decided some tasks for Pranav that he will execute over the next few days. We could not get time for a pair programming due to time constraints.

Pranav:

When is the next time you can find free time for a chat again? How about next week? I'm expecting the LazyPlots functionality, refactoring and more specs for rubyplot.

Regards,
Sameer Deshmukh

Pranav Garg

unread,
Jul 3, 2018, 11:22:31 AM7/3/18
to Sameer Deshmukh, SciRuby Mailing List
Hey Sameer,
Thank you very much for the chat today.
It cleared up a lot of doubts and I absolutely loved the discussion that we had.I will work on these tasks and send the updates. Lets have the meeting next Tuesday around the same time? Would it be suitable for you?

Just to reiterate the idea of Lazy plots here to keep others in loop:

We discussed that plots can be classified into two types.
Robust plot, ie the ones whose execution is independent to the axes base and values can be passed to them during initialisation(when pushed to task list). Like scatter plots where in you plot the coordinates

And Lazy plots, ie the ones whose execution is dependent on the base of axes and whose values need to be dynamically changed and passed when they are being called(when popped from task list). Like bar plot where the bar lies on the base (which can change if multiple plots are required).

Lazy plots would require parameter lookup and execution when called. And hence I will be modelling it as a class.


Regards 
Pranav Garg



John Woods

unread,
Jul 3, 2018, 11:50:08 AM7/3/18
to sciru...@googlegroups.com, Sameer Deshmukh
I'm having trouble understanding the difference between these two.

Suppose instead of setting my bars to start at the baseline, I wanted to make a stacked bar chart, or possibly a candlestick plot. What if I wanted to invert my bars and draw them from the top base downward? Wouldn't all of these be derived from the same base class?

Is it "lazy" because in a normal bar plot the bars always start at the base, even if the base is at y = -100 instead of y = 0?

It seems like a candlestick plot might have more in common with a scatter.

Can you please provide some more definitions or an example to help us understand?

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

Pranav Garg

unread,
Jul 3, 2018, 12:44:59 PM7/3/18
to SciRuby Mailing List, John Woods
Hey John,
The way that the bar graphs are implemented are by drawing rectangles which takes in the parameters  x_min, x_max, y_min and y_max. Which are the minimum and maximum co-ordinates of a rectangle. The thing about bar graph is that their base has to be set on the bottom of graph. (For a candlestick plot the roof of the graph needs to be on top ).
However the bottom and the top of the graph are decided when figures are plotting (in case user would like to make multiple plots on graph)

So suppose user passes

a = Rubyplot::Figure.new
a.bar([10, 20,30])

So me will push a command to the task list to draw rectangles with the base of y axis just set below 10
(some padding is added , you do not want bar with zero height)
Then if user wants another bar graph to be created over this graph he will add.

a.bar([-5, 0,60])
a.view

In this case the base of y axis would be set below -5 .So our previous bars would be hanging in the air.Same can be imagined for a candle graph.

Thus the idea of lazy plots. They are the types of plots who whise have certain parameters that are decided by certain state variable of a figure (say the base of y axis) and thus the parameters are called when they are called from the tasks list.

They are called lazy because they pass parameters to the GR functions at the when they are called rather than when they are instantiated.

So in a nutshell in robust plots the only depend on the data provided to them, Whereas Lazy plots depend on data provided to them and the state of the Figure.

Regards
PG

Arafat Khan

unread,
Jul 3, 2018, 3:36:37 PM7/3/18
to SciRuby Development
HI Pranav,
I remember you telling me about this a few days ago.  I am really glad you are following throught with this. 
Right now, I am not going to focus on this at all but please keep all of this discussion in this one single thread. I will maybe comeback later and see how I could adapt these ideas.

Regards,
Arafat

Sameer Deshmukh

unread,
Jul 3, 2018, 6:05:24 PM7/3/18
to John Woods, Pranav Garg, sciru...@googlegroups.com
John has made a good point.

Pranav, please follow up.

Regards,
Sameer Deshmukh
Reply all
Reply to author
Forward
0 new messages