You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have slowly been migrating towards converting all Element types to be subclasses of Dataset, which has also standardized their API. This means that the data is usually the first argument and other arguments are passed in as keywords. I think this brings with it an opportunity to take it one step further and standardize the signature of the constructor even more. In particular it frequently annoys me how verbose it can be to construct a simple Scatter or Curve plot, e.g.:
hv.Scatter(df, kdims=['year'], vdims=['gdp'])
IMO we should standardize on making the kdims the second and the vdims the third positional argument and allow passing a single dimension instead of a list of dimensions (which get wrapped up in a list internally). This means that in many cases the constructor would simplify to:
The only one of the current real Elements that does not fit into this scheme is Histogram which currently accepts the edges and values as two separate positional arguments but requiring those to be combined into one argument (which it already allowed) is more consistent anyway imo. The only exception then are the various Annotation elements, which I don't consider a particular issue since you rarely specify explicit dimensions on them anyway.
The text was updated successfully, but these errors were encountered:
We have slowly been migrating towards converting all
Element
types to be subclasses ofDataset
, which has also standardized their API. This means that the data is usually the first argument and other arguments are passed in as keywords. I think this brings with it an opportunity to take it one step further and standardize the signature of the constructor even more. In particular it frequently annoys me how verbose it can be to construct a simpleScatter
orCurve
plot, e.g.:IMO we should standardize on making the
kdims
the second and thevdims
the third positional argument and allow passing a single dimension instead of a list of dimensions (which get wrapped up in a list internally). This means that in many cases the constructor would simplify to:The only one of the current real Elements that does not fit into this scheme is
Histogram
which currently accepts the edges and values as two separate positional arguments but requiring those to be combined into one argument (which it already allowed) is more consistent anyway imo. The only exception then are the variousAnnotation
elements, which I don't consider a particular issue since you rarely specify explicit dimensions on them anyway.The text was updated successfully, but these errors were encountered: