Looks very nice! Thanks Jean Niklas. I've been using Incanter for charts,
which has been fine so far for my needs, but clj-xchart looks like it will
make it easier to make nicer charts, and it would avoid loading much of
Incanter when you don't need some of the other things Incanter provides.
(I also use nvd3 to generate charts in a browser with Clojurescript.)
Since you've developed a charting library, maybe I'll mention a feature
that I have wanted (I think!):
I've been making plots with a large number of points--100K, sometimes even
1M or 2M per data sequence. Sometimes I will sample a larger sequence
every 10 or 100 steps to reduce the burden on the Incanter or nvd3 plotting
function, but sometimes I want to see what the data looks like with all of
the points.
I generate the data in a lazy sequence, using iterate, where, let's say,
each element of the sequence is a map containing several pieces of y
values for the x value corresponding to that element of the sequence, e.g.
data = ({:a y-a-1, :b y-b-1, :c y-c-1}, {:a y-a-2, :b y-b-2, :c y-c-2}, ...)
In order to plot all three sequences of y values in Incanter or nvd3 (and
clj-xchart?), I have to extract a new sequence of values for each data
series, e.g. like this:
(map :a data)
(map :b data)
(map :c data)
and I have to generate several sequences of x values by calling (range)
repeatedly. I pass these six lazy sequences to the chart function, but at
least in Incanter and nvd3, I don't believe Incanter does anything until it
realizes all of the sequences. That means that it realizes six distinct
sequences, I think, and my initial sequence of maps will have been realized
as well.
But if I'm plotting several sequences of y values that are embedded in a
sequence of maps or vectors, each with several y values for the same x, I
wonder if it could be more to efficient pass the entire complex sequence to
the plotting function at once, and only provide one set of x values if all
of the y values will share the same x's. If the plotting function extracts
the y values as it reads through the sequence of maps/vectors, and needs
only one sequence of x's, then only two sequences are realized.
Maybe this is an unusual need, at present, but as Clojure is used for more
scientific applications, it might become more common.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.