Someone on #lisp started talking about making line charts using vecto, so I went ahead and got setup a common-lisp.net project: http://common-lisp.net/project/adw-charting/
Now I’m somewhat flooded with digital paperwork:
Get my darcs repository onto common-lisp.netUpdate the documentation to point to common-lisp.net(removed all the damn lies, so only vague untruths remain)- Get access to my trac sorted out (I sent an email to the cl.net admin)
Get my ssh keys sorted out- Get my setup at work pulling from the common-lisp.net darcs repo
- Get my setup at home pulling from the common-lisp.net darcs repo
- Make a script to generate docs/examples and transfer to common-lisp.net
- Make a script to generate / sign a new release
- figure out what I should be doing with mailing lists
I’ve never run an open source project before, I foresee a lot of learning in the coming weeks.
Paperwork aside, I did spend a lot of time last night on actual functionality. I spent a good bit of time reading through The Visual Display of Quantitative Information, to get a better sense of what goes into a good chart, and try to learn the right words for some of these things, and then worked on the code a bit:
- converted macros to use &body instead of &rest, which gives Emacs some better ideas on how to indent code
- REVERSEd the list of data elements before display, so the legends on pie/line charts are ordered sensibly
- Improved the example to not create duplicate X labels
- Pulled apart a monolithic function into several smaller ones, introduced a class to help pass data between them
- Tried to generate more human-friendly axis labels. Instead of splitting the y-axis into N even parts and drawing a label for whatever value happens to be there (which generates odd, unfriendly labels in the examples: 1.52, 3.05, 4.57), I look at the spread data, and pick a suitable interval. So, if the lowest y is -10 and the biggest is 2, then we have a total spread of 12, which is just over 10, so we should try to draw a label every 1.0 units. If the spread was 120, I’d try to draw a label every 10.0 units. I added some math to prevent overlapping labels, and then I have decent labels at human readable increments. There are still lots of problems with this scheme, so I haven’t pushed it yet. Hopefully I’ll have time tonight to work out some bugs, and add some more examples. This style of doing it would be a baby step towards another #lisp request, logarithmic axes.
I wasn’t very happy with using a helper class to pass state around, so I’ll probably try out a few different methods and see what works best.