|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Parallel coordinate plot type?I am looking to create a parallel coordinate plot for a paper I am
working on. However, most of the data visualization tools with parallel coordinate modes, such as GGobi, Mondrian and Manet, only seem to support interactive exploration and not output of the plots to some suitable vectorized format. (My data set is reasonably small, only about ~30 data points with 5-10 dimensions.) I've started looking at using gnuplot for this purpose, but there appears to be no PC plot type, and just plotting a normal diagram will obviously not produce satisfying results (unless I manually scale each dimension and edit in the axes afterwards). Any ideas on how to achieve this? Using gnuplot or some other (freely available) tool? (Sorry if this is an obvious question, but I have cast around a bit and I did not find an obvious answer.) +- Niklas Elmqvist (elm@...) ---------------------------+ |"Give a man a fire and he's warm for a day, but set fire to him | | and he's warm for the rest of his life." - Terry Pratchett, Jingo| +------------------------------------------------------------------+ _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: Parallel coordinate plot type?On Monday 12 June 2006 02:11 am, Niklas Elmqvist wrote:
> I am looking to create a parallel coordinate plot for a paper I am > working on. I was not familiar with this plot type, so I did some Googling. Is this an adequate description of what you want? http://www.agocg.ac.uk/reports/visual/casestud/brunsdon/parallel.htm > I've started looking at using gnuplot for this purpose, but there > appears to be no PC plot type Correct, there is no such plot type in gnuplot. It does look quite interesting, however, so I encourage you to submit it as a "Feature Request" on gnuplot's SourceForge site. > Any ideas on how to achieve this? Using gnuplot or some other (freely > available) tool? I think it would not be very hard to tweak your input data file so that gnuplot can produce a reasonable approximation of what you want. If if understand correctly (which I may not) then your data consists of a set of observations, each of which contains 5-10 associated values: # Obs #Val_1 #Val_2 #Val_3 ... #Val_10 ############################################### 1 val1 - val3 val10 2 val1 val2 val3 val10 3 val1 val2 val3 - 4 - val2 val3 val10 ... I have marked missing values with a '-' character. You want to plot this so that there is a line on the graph for each observation, and that line passes through val1 at x=1, val2 at x=2, and so on. I hope I got that correctly. The first issue is that gnuplot normally uses the x-axis to separate the *row* entries rather than the *column* entries. So you probably will have to transpose the rows and columns of your input data file, so that now it looks like this: Dim Obs1 Obs2 Obs3 ... Obs100 ############################################## Val_1 val1 val1 val1 val1 Val_2 - val2 val2 val2 Val_3 val3 val3 val3 val3 At this point it is relatively simple to plot in gnuplot. I will use auto-labelling commands from version 4.1, but you could get the same plot in earlier versions by placing the labels manually. Your plot commands would be something like set datafile missing '-' set key autotitle columnheader set key outside left set xrange [0.5:10.5] # Span the 10 dimensions set auto y # y will scale itself set style data line # plot with lines, no points # (lt -1) is thin black line plot "datafile" using xticlabel(1):2 lt -1, \ "" using 3 lt -1, \ "" using 4 lt -1, \ "" using 5 lt -1, \ ... "" using 100 lt -1 The vertical bars can be added manually: set arrow 1 from 1, graph 0 to 1, graph 1 nohead set arrow 2 from 2, graph 0 to 2, graph 2 nohead ... set arrow 10 from 10, graph 0 to 10, graph 10 nohead If you have a scaling function for a particular dimension, it can be defined and added as follows: # Normalization function for dimension 2 f_2(g) = (g - GMIN) / (GMAX-GMIN) input_2(g) = ($0 == 3) ? f_2(g) : g plot "datafile" using xticlabel(1):(input_2($2)), \ "" using (input_2($3)), \ ... > (Sorry if this is an obvious question, but I have cast around a bit > and I did not find an obvious answer.) Not so obvious, but quite possible. I am intrigued by the plot mode, and will seriously consider adding it as a supported plot type. It is similar in many ways to the stacked histogram plot modes, so a model already exists for its implementation in gnuplot. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: Parallel coordinate plot type?On Monday 12 June 2006 11:07 am, Ethan Merritt wrote:
> On Monday 12 June 2006 02:11 am, Niklas Elmqvist wrote: > > I am looking to create a parallel coordinate plot for a paper I am > > working on. > > I was not familiar with this plot type, so I did some Googling. > Is this an adequate description of what you want? > > > http://www.agocg.ac.uk/reports/visual/casestud/brunsdon/parallel.htm > > > I've started looking at using gnuplot for this purpose, but there > > appears to be no PC plot type > > Correct, there is no such plot type in gnuplot. > It does look quite interesting, however, so I encourage you to submit > it as a "Feature Request" on gnuplot's SourceForge site. > > > Any ideas on how to achieve this? Using gnuplot or some other > > (freely available) tool? > > I think it would not be very hard to tweak your input data file so > that gnuplot can produce a reasonable approximation of what you want. Doh! It has occurred to me that if you forego the fancy labelling, etc, then no special preparation of the data is needed, although I am not sure how well it handles missing entries in the vectors. You can plot your data in one shot simply by saying: plot "datafile" matrix with lines -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: Parallel coordinate plot type?Thanks for all of your help. I will play around with especially the
latter example you gave in your other response to this message. Ethan Merritt wrote: > On Monday 12 June 2006 02:11 am, Niklas Elmqvist wrote: >> I am looking to create a parallel coordinate plot for a paper I am >> working on. > > I was not familiar with this plot type, so I did some Googling. > Is this an adequate description of what you want? > > http://www.agocg.ac.uk/reports/visual/casestud/brunsdon/parallel.htm That's right. It's commonly used in visualization of multidimensional data when you run out of the normal dimensions. Some relevant papers on this includes much of the recent information visualization papers, as well as the original work by Alfred Inselberg. [snip] > I am intrigued by the plot mode, and will seriously consider > adding it as a supported plot type. It is similar in many ways > to the stacked histogram plot modes, so a model already exists > for its implementation in gnuplot. Sounds great. I was fearing I would have to draw the diagram manually using xfig. My datasets are no massive, but that would still be painful. /Niklas +- Niklas Elmqvist (elm@...) ---------------------------+ |"Give a man a fire and he's warm for a day, but set fire to him | | and he's warm for the rest of his life." - Terry Pratchett, Jingo| +------------------------------------------------------------------+ _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
| Free embeddable forum powered by Nabble | Forum Help |