1 %>@ingroup datasettools
3 %>@brief Draws 3-D scatter plot
6 %> @param idx_fea What features to use. Numbers point to columns in @c data.X
7 %> @param confidences a list of percentages (]0, 1[) for the confidence ellipses
9 %> @arg 0 - no text anotation
10 %> @arg 1 - annotates "obsnames"
11 %> @arg 2 - annotates "groupcodes"
12 %> @return <em>[data]</em>
13 %> @return <em>[data, handles]</em>. handles: handles for the legends
15 global FONT FONTSIZE SCALE;
18 if ~exist('confidences', 'var')
22 if ~exist('textmode', 'var')
27 irerror('idx_fea must have 3 elements!');
29 if any(idx_fea > data.nf)
30 irerror(sprintf('Dataset has only %d feature(s)!', data.nf));
35 no_classes = size(pieces, 2);
37 X = pieces(i).X(:, idx_fea([1 2 3]));
39 hh = plot3(X(:, 1), X(:, 2), X(:, 3), 'Color',
find_color(i), 'Marker',
find_marker(i), 'MarkerSize',
find_marker_size(i), 'MarkerFaceColor',
find_color(i), 'LineStyle', 'none');
43 if textmode == 1 && ~isempty(pieces(i).obsnames)
44 text(X(:, 1), X(:, 2), X(:, 3), pieces(i).obsnames); %, 'FontName', FONT, 'FontSize', FONTSIZE*.7);
45 elseif textmode == 2 && ~isempty(pieces(i).groupcodes)
46 text(X(:, 1), X(:, 2), X(:, 3), pieces(i).groupcodes); %, 'FontName', FONT, 'FontSize', FONTSIZE*.7);
52 if ~isempty(confidences)
55 for j = 1:length(confidences)
56 error_ellipse(C, m, 'conf', confidences(j), 'Color',
find_color(i));
61 mins = min(data.X(:, idx_fea), [], 1);
62 maxs = max(data.X(:, idx_fea), [], 1);
65 xlim([mins(1)-lens(2)*K, maxs(1)+lens(1)*K]);
66 ylim([mins(2)-lens(2)*K, maxs(2)+lens(2)*K]);
67 zlim([mins(3)-lens(3)*K, maxs(3)+lens(3)*K]);
70 feanames = data.get_fea_names(idx_fea);
81 varargout = {data, handles};
function find_marker(in i)
function find_color(in i)
function find_marker_size(in i)
function data_get_legend(in data)
function data_draw_scatter_3d(in data, in idx_fea, in confidences, in textmode)
function data_split_classes(in data, in hierarchy)