Re: Plotting categorical data

Gordon Haverland

Categorical, well it's almost all categorical. One variable is
basically time, so the other stuff is nominally like a time-series.

There seems to be packages to deal with data that is all categorical,
having one variable being continuous (or a time series) is a problem
for that.

Something to search for in this regard seems to be parallel coordinate
plots (parcoord).

Anyway, I installed cdparcoord (?) into my local R site-library as root
(it's not in the Debian package library); I got this huge list of
dependencies, which took a while to compile. There was an error at
some point about ggplot being too old. Debian does have ggplot, and
what I have installed is supposedly new enough.

It appears I had an older version of ggplot in my local site-library,
and it was taking that by default. So, I had to remove.packages() it.
Then it could see the system installed ggplot, which allowed the next
package to install (plotly?), which allowed cdparcoord (dcparcoord?) to
install, so I could play with it.

It seems plotly is a requirement (mentioned in the play-by-play above)
for this continuous discrete parallel coordinate plotting package I had
started with.

Since I had plotly (now) installed, I might as well investigate it.
Learning plotly is just about like learning R all by itself (plotly
works with other systems, it isn't just R).

Plotly has tutorials (which assume far too much), and it has "man"
pages, which are HUGE. And if you try things based on the man page,
you get warnings that they don't work. Documentation out of date, who
would have thunk? :-)

I want to tie things to the categorical variable Referee. So, I would
like to have the chart(s) I make, use a symbol where there is a data
point that is useful, and connect data points with lines.

My first successes with getting a start on displaying one "Y" variable
told me that I could only use 8 colours (and I have more than 16
referees in the data). So line colour can't be a unique indicator.
You are allowed to specify the symbol used for a data marker, but you
aren't supposed to have more than 6 different symbols. But 8*6=48 is
more combinations than I will have referee data for. There also seems
to be different kinds of line styles (dotted, dashed, ...) which you
could employ. I've seen too many articles about data presentation when
some people are colour blind, which say that you should use colour and
line style together to provide something unique to lines which make it
easy for most colour blind people to understand what is going on (not
use line style to multiply the number of combinations you can do). But
plotly doesn't seem to have any way to do this sort of thing. Or not
that I can find yet. If you are adept at R, maybe something is trivial
to do?

It seems that plotly can "stack" a number of subplots all using the
same X axis. Which I am hoping will let me work with my multiple other
"Y" variables.

Plotly is "interactive". I started an R session in a shell, and for
the first things I was working on, I would see a graphical window pop
up when I looked to plot something in R, just like Gnuplot does. When
I started with plotly, I would try a command and hit enter, and nothing
happened. I switch back to the desktop where my browser (seamonkey)
was running and it is now displaying a strange page, not the page I had
been on (I have many tabs running).

What is happening, is that when I issue a command in the R session in
an xterm, the response from plotly is to start a new tab in my browser
with some kind of output. And it I am just beginning, the output in
this new browser tab is likely far from useful, and possible not
recognizable as being what it is (display the data you asked for, and
not the data you wanted).

After stacking up 20 or so new tabs, all with failed experiments on
getting plotly to do what I want, I realised I need to delete these
tabs in my browser as I go along.

I have yet to see the "interactive" part. Anything I get to display in
my web browser, isn't what I am looking for; and to change it, I need
to go back to the xterm and issue a new command (which pops up a new

So far, it is pretty and it is not very useful. Typical of technology
today. Hopefully things improve.



Join to automatically receive all group messages.