Open szaydel opened 6 years ago
@szaydel
This looks really amazing.
Please do send a PR and I will make some comments/suggestions and will eventually merge it.
Thanks a lot.
@Arafatk, Let me clean-up a bit, add some tests, and implement a few things I wanted to implement and I will send a PR. Thanks for considering it!
Cheers.
Just wanted to give an update. I am still working on a few improvements before I do a PR. I wanted to propose a model where there are distinct types representing plot styles, i.e. there's a type for histograms, a type for points, etc., and each such type encodes all necessary information, as well as allows for some degree of customization. The type is then tied to a PointGroup, and multiple PointGroups are tied to a plot area or canvas. I am thinking of this as a more modular way to structure things, and a bit more object oriented.
Basic goal is to define a Geom, a Geometric Object struct, like in this example we have a HistogramGeom which includes a style struct, and this struct satisfies a PlotStyler Interface, which generalizes configuration of the different Geoms. The goal is to have a common interface for configuring different plotting styles, which depending on the style may require using the set style
command or not, etc.
// HistogramStyle describes stylistic elements that may be attributed to histogram
type HistogramStyle struct {
Empty bool
Solid bool
Border bool
}
// HistogramGeom --
type HistogramGeom struct {
style HistogramStyle
}
@szaydel Really sorry for the late reply.
This looks really good and modular and will certainly help a lot in the long term when we try to extend the library functionalities.
Please go ahead with the pull request or maybe keep it a work in progress, the very first pull request doesn't have to be directly merged but atleast I can take a look at it and make comments if needed.
Thanks @Arafatk. I will get this stuff prepared in the next few days, or over weekend and do a PR. If you want to start a Dev branch of some sort, I can do a PR against it instead of Master.
I have been playing around with the library a bit and made some changes over time. These are just ideas I wanted to share and see if there's much interest. Most of them are half-baked, as such no PR yet, but if you have interest in these, I am sure I can bring them closer to being useful.