Interface is very verbose, lots of boilerplate, lacks default behavior
See original GitHub issueI love the look and feel of this library, and I have been looking for replacements to matplotlib. However, I find it frustrating to dig in because of the amount of boilerplate required.
Contrast
plt.plot(xs, ys)
with
sc_x = LinearScale()
sc_y = LinearScale()
scale = {'x': sc_x, 'y': sc_y}
ax_x = Axis(scale=sc_x)
ax_y = Axis(scale=sc_y, orientation='vertical')
line = Lines(x=xs, y=ys, scales=scale)
Figure(marks=[line], axes=[ax_x, ax_y])
to achieve virtually the same thing. I would really like to be able to just call Lines(xs, ys)
and have it know I want a basic line plot with linear axes, and yes of course I want the y-axis vertical. Even x=
and y=
feels a bit redundant, 95% of line plots will be taking x and y as the first arguments (or better yet a (Nx2) array with x-y pairs as a single argument).
Additionally, the docstrings do not give a descriptive prototype, I just see args and kwargs, and thus I have to consult the api documentation to know what goes in there. I realize these may come across as a bit picky, but I think it’s small little UX niceties like this that make a library truly shine. Even just wrappers/aliases to emulate matplotlib like functionality/calls.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Doesn’t this work?
Yes there’s an additional
blt.show()
line but I wouldn’t say its that much more verbose?So @xkortex the issue might be on your side