1

I have following format of data in a .txt file.

नोभेम्बर 
 [0.013597779962868256, -0.10849757437254635, -0.15999846585159766, -1.2417475384869558, -0.6802765400695919, 0.44552601044477186, 0.10820787964125786, -1.584483680411645, 0.2007759414522207, -0.7101547556233192]
 बाट
[0.7488351202673913, 0.3645634610332536, 0.1937027124201285, -0.10361011958447905, 0.48222626651261347, 0.36795608937720814, -0.06307932558713457, -0.05626217864435294, -0.5245206209054951, 0.40256760017279525]
रूपमा
[0.06077674960453302, 0.2570556052636379, 0.3347552495487344, -0.10512580657948888, 0.10414134700640766, 0.19736087970834254, 0.09207914995816116, 0.19904934221006, 0.061402311347008, -0.11409541813280075]
बोर्डमा
[0.5200111891848155, -0.14947230042320633, 0.7351562111464331, -0.7542450932215059, 1.4477558941048831, -0.6235133303135835, -0.7781689512584442, -0.057886889872348815, 0.10625424653444066, 0.9777761194886687]
आउनु
[1.0596966006985387, 0.24909505933749815, 0.5181999691383957, -0.01983089009044503, -1.4106664226234644, -0.020542297788816014, -0.7822719255911348, 0.42914674116391344, -0.5753257725556651, -0.9141151600890186]

The word is like नोभेम्बर are data points and the numeric values are their vector representation. I would like to take those representation as co-ordinate and plot them so as to find the relations among them. What can be the possibilities to plot them.Any suggested tools are really appreciated.

thetna
  • 6,903
  • 26
  • 79
  • 113

2 Answers2

2

My GUI couldn't handle that font for the item names, but if I name them: a,b,cc,d,e, you can use parallel coordinate plots to display multi-dimensional features:

require(MASS)  # an R package
parcoord(data.frame(a=a,b=b,cc=cc,d=d,e=e), col=1:5)

enter image description here

IRTFM
  • 258,963
  • 21
  • 364
  • 487
  • if I'm not mistaken, I think the OP meant it the other way around: 5 instances of 10-dimensions each (as in you need to transpose the matrix) – Amro Apr 25 '12 at 21:51
  • Could very well be. I can't tell from the description. I'm thankful to the questioner for bringing this up. I have already applied it to my research questions today. – IRTFM Apr 25 '12 at 22:04
1

Here is a MATLAB solution.

First we read the data. Although MATLAB is capable of reading Unicode text, it has some issues displaying it in GUI (so I'm just replacing the labels with Point1/Point2, etc..)

%# read file lines
fid = fopen('data.txt', 'rt', 'native', 'UTF-8');
C = textscan(fid, '%s', 'Delimiter','\n');
fclose(fid);
C = C{1};

%# split into labels/data
labels = C(1:2:end);
data = cellfun(@str2num, C(2:2:end), 'UniformOutput',false);
data = cell2mat(data);

%# HACK: MATLAB has issues displaying unicode text
labels = num2str((1:size(data,1))', 'Point %d');

Next we can plot the data using parallel coordinates:

%# you might need to normalize the attributes
%#data = zscore(data);

plot(data');            %'# plot lines
set(gca, 'XTick',1:numDim, 'XGrid','on')
xlabel('Features'), ylabel('Feature value')
title('Parallel Coordinates')
legend(labels)          %# show legend of labels

parallel coordinates

If you have access to the Statistics Toolbox, you can visualize multivariate data using a number of techniques:

%# parallel coordinates (similar the above)
parallelcoords(data, 'Group',labels)

%# glyph plot (stars)
glyphplot(data, 'obslabels',labels, 'glyph','star')

glyphplot_star

%# glyph plot (Chernoff faces)
glyphplot(data, 'obslabels',labels, 'glyph','face')

glyphplot_face

%# Andrews curves
andrewsplot(data, 'Group',labels)

andrewsplot

Community
  • 1
  • 1
Amro
  • 123,847
  • 25
  • 243
  • 454