Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Modifying the font size of a Glyphplot Label

26 views
Skip to first unread message

Riccardo Del Bosco

unread,
Jan 19, 2011, 5:49:04 PM1/19/11
to
Hi,
I have to generate hundreds of labelled star plots (glyphplot function) in order to observe my data. The problem I am having is that the labels for each graph possess a font that is too large and has too many significant figures; as a result, the labels intersect each other and it becomes a big mess. I was just wondering if anyone can help me resolve this issue. I have tried the 'set' command with "FontSize" but I've had no luck. Below are the couple of lines of code I have to work with:

Parameters_ID =['RPM', 'Torque', 'RPMReq', 'PenRate', 'Pulldown', 'PulldownReq', 'VerticalVib', 'HorizontalVib'];
labelstr = strcat(num2str(Drillbitnum),': ',num2str(Selected_Depth));
h = glyphplot((Select_Parameters), 'glyph', 'star','varLabels',Parameters_ID,'obslabels',labelstr);


Thank you for any help,

Regards,

Riccardo

Peter Perkins

unread,
Jan 20, 2011, 9:36:32 AM1/20/11
to

Riccardo, you're on the right track, you just have to use the handles in
that output from GLYPHPLOT. I ran something like the help example:

>> load carsmall
>> X = [Acceleration Displacement Horsepower MPG Weight];
>> h = glyphplot(X, 'Glyph','face', 'ObsLabels',Model);

h is a matrix, whose third column contains graphics handles for each of
the labels. If you look at all the properties for one of them, ...

>> get(h(1,3))
Annotation = [ (1 by 1) hg.Annotation array]
BackgroundColor = none
Color = [0 0 0]
DisplayName =
EdgeColor = none
Editing = off
Extent = [0.265868 8.43883 1.45309 0.178641]
FontAngle = normal
FontName = Helvetica
FontSize = [10]
FontUnits = points
[snip]
Type = text
UIContextMenu = []
UserData = []
Visible = on

... you can see what you need to set, and you can do it for all the
handles at once.

>> set(h(:,3),'fontsize',4)

As far as the number of significant figures in your labels, tjhat's up
to you, presumably you want to use one of the optional inputs to NUM2STR
to control that.

Hope this helps.

Riccardo Del Bosco

unread,
Jan 20, 2011, 1:17:05 PM1/20/11
to
Peter Perkins <Peter....@MathRemoveThisWorks.com> wrote in message <ih9h9g$5g5$1...@fred.mathworks.com>...


Thanks for your help Peter, I am going to try it out!

0 new messages