Changing font size using xlabel
Mostrar comentarios más antiguos
[EDIT: Mon Jun 6 16:32:41 UTC 2011 - Reformat - MKF]
Hello, I am putting a label on a graph using xlabel, and I want to increase the size of the font (to about 30) and possibly bold it (although, this is less important and I have not yet tried this).
I have tired using:
xlabel(text, 'FontSize', 30)
but this produces no notable change in the font size. Thank you in advance for your help!
Edit:
Using:
h = xlabel(printnombrejpg,'FontSize',60);
get(h)
Returns:
Annotation = [ (1 by 1) hg.Annotation array]
BackgroundColor = none
Color = [0 0 0]
DisplayName =
EdgeColor = none
Editing = off
Extent = [-435.849 -11.5896 837.736 8.69217]
FontAngle = normal
FontName = Helvetica
FontSize = [60]
FontUnits = points
FontWeight = normal
HorizontalAlignment = center
LineStyle = -
LineWidth = [0.5]
Margin = [2]
Position = [-5.76923 -4.46355 1.00011]
Rotation = [0]
String = cr45f__ch_24
Units = data
Interpreter = tex
VerticalAlignment = cap
BeingDeleted = off
ButtonDownFcn =
Children = []
Clipping = off
CreateFcn =
DeleteFcn =
BusyAction = queue
HandleVisibility = off
HitTest = on
Interruptible = on
Parent = [222.028]
Selected = off
SelectionHighlight = on
Tag =
Type = text
UIContextMenu = []
UserData = []
Visible = on
4 comentarios
Arturo Moncada-Torres
el 6 de Jun. de 2011
Mmm, pretty weird. Do you have the code?
Robert Cumming
el 6 de Jun. de 2011
try changing the color just to make sure you are interacting with the correct handle
A
el 6 de Jun. de 2011
Brando Miranda
el 30 de Mzo. de 2017
do you know how to do this in the GUI?
Respuesta aceptada
Más respuestas (2)
Paulo Silva
el 6 de Jun. de 2011
h=xlabel('mylabel') %or h=get(gca,'xlabel')
set(h, 'FontSize', 30)
set(h,'FontWeight','bold') %bold font
1 comentario
Brando Miranda
el 30 de Mzo. de 2017
do you know how to do this in the GUI?
Chirag Gupta
el 6 de Jun. de 2011
Well it works for me!
I would suggest you try:
h = xlabel(text,'FontSize',30);
get(h)
and examine the properties. Specifically FontUnits
3 comentarios
A
el 6 de Jun. de 2011
A
el 6 de Jun. de 2011
Brando Miranda
el 30 de Mzo. de 2017
do you know how to do this in the GUI?
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!