이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
Adjust the width of the black line in bubblelegend
조회 수: 54 (최근 30일)
이전 댓글 표시
In the example below, I would like to increase the thickness of the black line that connects the number "88" to the number "486."
x = 1:10;
y = exp(-0.5*x) + .05 * randn(1,10);
sz = randi([20 500],[1,10]);
bubblechart(x,y,sz)
bubblelegend('Population')

댓글 수: 4
Dyuman Joshi
2025년 12월 9일 16:05
There doesn't seem to be any property of the scale line in the bubblelegend object, which can be modified.
Sim
2025년 12월 9일 16:35
편집: Sim
2025년 12월 9일 16:35
Thanks for your comment @Dyuman Joshi! ...I was checking the same properties and I did not find anything yet... maybe, I might ask to the @MathWorks Support Team if they might know some trick... :-)
DGM
2025년 12월 10일 16:54
편집: DGM
2025년 12월 10일 16:55
Well, those properties do exist, but you're prevented from acessing them.
x = 1:10;
y = exp(-0.5*x) + .05 * randn(1,10);
sz = randi([20 500],[1,10]);
bubblechart(x,y,sz)
hl = bubblelegend('Population');

struct(hl) % there are axle width properties and a (linestrip) axle object available
Warning: Calling STRUCT on an object prevents the object from hiding its implementation details and should thus be avoided. Use DISP or DISPLAY to see the visible public details of an object. See 'help struct' for more information.
Warning: The EraseMode property is no longer supported and will error in a future release.
ans = struct with fields:
NumBubbles: 3
NumBubblesMode: 'manual'
NumBubbles_I: 3
Style: 'vertical'
StyleMode: 'manual'
Style_I: 'vertical'
BubbleSizeOrder: 'descending'
BubbleSizeOrderMode: 'manual'
BubbleSizeOrder_I: 'descending'
LimitLabels: {3×1 cell}
LimitLabelsMode: 'auto'
LimitLabels_I: {3×1 cell}
Padding: 8
AxleWidth: 5
AxlePadding: 5
AxleIsUsed: 1
BubbleSizes: [50 40 10]
BubbleColor: [0 0 0]
Location: 'northeast'
LocationMode: 'auto'
Location_I: 'northeast'
NeutralColor: [0.4000 0.4000 0.4000]
DefaultBubbleLineWidth: 0.5000
BubbleLineWidth: 0.5000
BubbleEdgeColor: [0 0 0]
BubbleAlpha: 1
PrintSettingsCache: [1×1 struct]
BubbleContainer: [1×1 Marker]
BubbleContainerMode: 'auto'
BubbleContainer_I: [1×1 Marker]
Axle: [1×1 LineStrip]
Bubbles: [1×1 Marker]
LabelBig: [1×1 Text]
LabelMedium: [1×1 Text]
LabelSmall: [1×1 Text]
Camera: [1×1 Camera2D]
CameraMode: 'auto'
Camera_I: [1×1 Camera2D]
DataSpace: [1×1 UniformCartesianDataSpace]
DataSpaceMode: 'auto'
DataSpace_I: [1×1 UniformCartesianDataSpace]
ColorSpace: [1×1 MapColorSpace]
ColorSpaceMode: 'auto'
ColorSpace_I: [1×1 MapColorSpace]
DecorationContainer: [1×1 Group]
DecorationContainerMode: 'auto'
DecorationContainer_I: [1×1 Group]
BoxEdge: [1×1 LineLoop]
BoxEdgeMode: 'auto'
BoxEdge_I: [1×1 LineLoop]
BoxFace: [1×1 Quadrilateral]
BoxFaceMode: 'auto'
BoxFace_I: [1×1 Quadrilateral]
Title: [1×1 Text]
TitleMode: 'auto'
Title_I: [1×1 Text]
SelectionHandle: [1×1 ListOfPointsHighlight]
SelectionHandleMode: 'auto'
SelectionHandle_I: [1×1 ListOfPointsHighlight]
TitleSeparator: [1×1 LineStrip]
TitleSeparatorMode: 'auto'
TitleSeparator_I: [1×1 LineStrip]
Axes: [1×1 Axes]
AxesMode: 'manual'
Axes_I: [1×1 Axes]
AxesListenerList: [1×5 event.listener]
AxesListenerListMode: 'manual'
AxesListenerList_I: [1×5 event.listener]
Box: on
BoxMode: 'auto'
Box_I: on
Color: [1 1 1]
ColorMode: 'auto'
Color_I: [1 1 1]
EdgeColor: [0.1294 0.1294 0.1294]
EdgeColorMode: 'auto'
EdgeColor_I: [0.1294 0.1294 0.1294]
FontName: 'Helvetica'
FontNameMode: 'auto'
FontName_I: 'Helvetica'
FontSize: 9
FontSizeMode: 'auto'
FontSize_I: 9
FontUnits: 'points'
FontUnitsMode: 'auto'
FontUnits_I: 'points'
FontAngle: 'normal'
FontAngleMode: 'auto'
FontAngle_I: 'normal'
FontWeight: 'normal'
FontWeightMode: 'auto'
FontWeight_I: 'normal'
Interpreter: 'tex'
InterpreterMode: 'auto'
Interpreter_I: 'tex'
InitPositionCache: 1
WindowMouseReleaseListener: [0×0 event.listener]
WindowMouseReleaseListenerMode: 'auto'
WindowMouseReleaseListener_I: [0×0 event.listener]
LineWidth: 0.5000
LineWidthMode: 'auto'
LineWidth_I: 0.5000
Orientation: 'vertical'
OrientationMode: 'auto'
Orientation_I: 'vertical'
PlotChildren: [1×1 BubbleChart]
PlotChildrenMode: 'auto'
PlotChildren_I: [1×1 BubbleChart]
Height: 0.4448
HeightMode: 'auto'
Height_I: 0.4448
Width: 0.2384
WidthMode: 'auto'
Width_I: 0.2384
Position: [0.6471 0.4550 0.2384 0.4448]
PositionMode: 'auto'
Position_I: [0.6471 0.4550 0.2384 0.4448]
SPosition: []
PositionCache: []
ParentSizeChangedListener: [0×0 event.listener]
PrintAlphaSupported: 1
PrintAlphaSupportedMode: 'auto'
PrintAlphaSupported_I: 1
PreventLegendResizePrintingPosition: []
SelfListenerList: [0×0 event.listener]
SelfListenerListMode: 'auto'
SelfListenerList_I: [0×0 event.listener]
TextColor: [0.1294 0.1294 0.1294]
TextColorMode: 'auto'
TextColor_I: [0.1294 0.1294 0.1294]
Units: 'normalized'
UnitsMode: 'auto'
Units_I: 'normalized'
standalone: off
standaloneMode: 'auto'
standalone_I: off
ChildrenMode: 'auto'
Children_I: [0×0 GraphicsPlaceholder]
Children: [0×0 GraphicsPlaceholder]
SerializableChildren: [0×0 GraphicsPlaceholder]
Description: ''
DescriptionMode: 'auto'
Description_I: ''
Parent: [1×1 Figure]
ParentMode: 'manual'
Parent_I: [1×1 Figure]
Visible: on
VisibleMode: 'auto'
Visible_I: on
Serializable: on
SerializableMode: 'auto'
Serializable_I: on
HandleVisibility: 'on'
HandleVisibilityMode: 'auto'
HandleVisibility_I: 'on'
ErrorCallback: ''
ErrorCallbackMode: 'auto'
ErrorCallback_I: ''
Internal: 0
ApplicationData: [1×1 struct]
SerializableApplicationData: [1×1 struct]
DefaultPropMap_Internal: [0×0 struct]
Copyable: 1
NodeParent: [1×1 AxesLayoutManager]
NodeChildren: [1×1 Camera2D]
CustomThemePropertyMappings: [1×1 struct]
HG1Erase: 'normal'
HG1EraseMode: 'auto'
HG1Erase_I: 'normal'
EraseMode: 'normal'
Behavior: [1×1 struct]
BehaviorMode: 'auto'
Behavior_I: [1×1 struct]
HelpTopicKey: ''
HelpTopicKeyMode: 'auto'
HelpTopicKey_I: ''
SerializableBehavior: [1×1 struct]
ButtonDownFcnMode: 'auto'
ButtonDownFcn_I: ''
ButtonDownFcn: ''
ButtonDownFcn_IS: ''
SerializableUIContextMenu: [0×0 GraphicsPlaceholder]
ContextMenu: [0×0 GraphicsPlaceholder]
UIContextMenu: [0×0 GraphicsPlaceholder]
TopLevelSerializedObject: on
BusyAction: 'queue'
BeingDeleted: off
Interruptible: on
CreateFcnMode: 'auto'
CreateFcn_I: ''
CreateFcn: ''
CreateFcn_IS: ''
DeleteFcnMode: 'auto'
DeleteFcn_I: ''
DeleteFcn: ''
DeleteFcn_IS: ''
Type: 'bubblelegend'
TagMode: 'auto'
Tag_I: ''
Tag: ''
UserData: []
SerializableUserData: []
Selected: off
SelectedMode: 'auto'
Selected_I: off
SelectionHighlight: on
SelectionHighlightMode: 'auto'
SelectionHighlight_I: on
HitTestMode: 'auto'
HitTest_I: on
HitTest: on
PickablePartsMode: 'auto'
PickableParts_I: 'visible'
PickableParts: 'visible'
CausesLayoutUpdate: on
Layout: [0×0 matlab.ui.layout.LayoutOptions]
struct(hl.Axle) % but you're no longer allowed to access private object properties
No public property 'Axle' for class ''BubbleLegend''.
I don't know if it's the behavior of these newer graphics objects or just the behavior of newer MATLAB versions (or both), but it just feels like everything is becoming ultimately less flexible. There are hardly any public properties for the bubblelegend object. All of the useful ones are hidden and inacessible.
That said, I only have R2019b, which predates bubblelegend. I'm stuck trying to test this in the forum editor. I don't know if any of these restrictions are a consequence of that.
Sim
2025년 12월 10일 17:05
편집: Dyuman Joshi
2025년 12월 10일 17:07
I have just tried the piece of code you used,
x = 1:10;
y = exp(-0.5*x) + .05 * randn(1,10);
sz = randi([20 500],[1,10]);
bubblechart(x,y,sz)
hl = bubblelegend('Population');

struct(hl)
Warning: Calling STRUCT on an object prevents the object from hiding its implementation details and should thus be avoided. Use DISP or DISPLAY to see the visible public details of an object. See 'help struct' for more information.
Warning: The EraseMode property is no longer supported and will error in a future release.
ans = struct with fields:
NumBubbles: 3
NumBubblesMode: 'manual'
NumBubbles_I: 3
Style: 'vertical'
StyleMode: 'manual'
Style_I: 'vertical'
BubbleSizeOrder: 'descending'
BubbleSizeOrderMode: 'manual'
BubbleSizeOrder_I: 'descending'
LimitLabels: {3×1 cell}
LimitLabelsMode: 'auto'
LimitLabels_I: {3×1 cell}
Padding: 8
AxleWidth: 5
AxlePadding: 5
AxleIsUsed: 1
BubbleSizes: [50 40 10]
BubbleColor: [0 0 0]
Location: 'northeast'
LocationMode: 'auto'
Location_I: 'northeast'
NeutralColor: [0.4000 0.4000 0.4000]
DefaultBubbleLineWidth: 0.5000
BubbleLineWidth: 0.5000
BubbleEdgeColor: [0 0 0]
BubbleAlpha: 1
PrintSettingsCache: [1×1 struct]
BubbleContainer: [1×1 Marker]
BubbleContainerMode: 'auto'
BubbleContainer_I: [1×1 Marker]
Axle: [1×1 LineStrip]
Bubbles: [1×1 Marker]
LabelBig: [1×1 Text]
LabelMedium: [1×1 Text]
LabelSmall: [1×1 Text]
Camera: [1×1 Camera2D]
CameraMode: 'auto'
Camera_I: [1×1 Camera2D]
DataSpace: [1×1 UniformCartesianDataSpace]
DataSpaceMode: 'auto'
DataSpace_I: [1×1 UniformCartesianDataSpace]
ColorSpace: [1×1 MapColorSpace]
ColorSpaceMode: 'auto'
ColorSpace_I: [1×1 MapColorSpace]
DecorationContainer: [1×1 Group]
DecorationContainerMode: 'auto'
DecorationContainer_I: [1×1 Group]
BoxEdge: [1×1 LineLoop]
BoxEdgeMode: 'auto'
BoxEdge_I: [1×1 LineLoop]
BoxFace: [1×1 Quadrilateral]
BoxFaceMode: 'auto'
BoxFace_I: [1×1 Quadrilateral]
Title: [1×1 Text]
TitleMode: 'auto'
Title_I: [1×1 Text]
SelectionHandle: [1×1 ListOfPointsHighlight]
SelectionHandleMode: 'auto'
SelectionHandle_I: [1×1 ListOfPointsHighlight]
TitleSeparator: [1×1 LineStrip]
TitleSeparatorMode: 'auto'
TitleSeparator_I: [1×1 LineStrip]
Axes: [1×1 Axes]
AxesMode: 'manual'
Axes_I: [1×1 Axes]
AxesListenerList: [1×5 event.listener]
AxesListenerListMode: 'manual'
AxesListenerList_I: [1×5 event.listener]
Box: on
BoxMode: 'auto'
Box_I: on
Color: [1 1 1]
ColorMode: 'auto'
Color_I: [1 1 1]
EdgeColor: [0.1294 0.1294 0.1294]
EdgeColorMode: 'auto'
EdgeColor_I: [0.1294 0.1294 0.1294]
FontName: 'Helvetica'
FontNameMode: 'auto'
FontName_I: 'Helvetica'
FontSize: 9
FontSizeMode: 'auto'
FontSize_I: 9
FontUnits: 'points'
FontUnitsMode: 'auto'
FontUnits_I: 'points'
FontAngle: 'normal'
FontAngleMode: 'auto'
FontAngle_I: 'normal'
FontWeight: 'normal'
FontWeightMode: 'auto'
FontWeight_I: 'normal'
Interpreter: 'tex'
InterpreterMode: 'auto'
Interpreter_I: 'tex'
InitPositionCache: 1
WindowMouseReleaseListener: [0×0 event.listener]
WindowMouseReleaseListenerMode: 'auto'
WindowMouseReleaseListener_I: [0×0 event.listener]
LineWidth: 0.5000
LineWidthMode: 'auto'
LineWidth_I: 0.5000
Orientation: 'vertical'
OrientationMode: 'auto'
Orientation_I: 'vertical'
PlotChildren: [1×1 BubbleChart]
PlotChildrenMode: 'auto'
PlotChildren_I: [1×1 BubbleChart]
Height: 0.4448
HeightMode: 'auto'
Height_I: 0.4448
Width: 0.2384
WidthMode: 'auto'
Width_I: 0.2384
Position: [0.6471 0.4550 0.2384 0.4448]
PositionMode: 'auto'
Position_I: [0.6471 0.4550 0.2384 0.4448]
SPosition: []
PositionCache: []
ParentSizeChangedListener: [0×0 event.listener]
PrintAlphaSupported: 1
PrintAlphaSupportedMode: 'auto'
PrintAlphaSupported_I: 1
PreventLegendResizePrintingPosition: []
SelfListenerList: [0×0 event.listener]
SelfListenerListMode: 'auto'
SelfListenerList_I: [0×0 event.listener]
TextColor: [0.1294 0.1294 0.1294]
TextColorMode: 'auto'
TextColor_I: [0.1294 0.1294 0.1294]
Units: 'normalized'
UnitsMode: 'auto'
Units_I: 'normalized'
standalone: off
standaloneMode: 'auto'
standalone_I: off
ChildrenMode: 'auto'
Children_I: [0×0 GraphicsPlaceholder]
Children: [0×0 GraphicsPlaceholder]
SerializableChildren: [0×0 GraphicsPlaceholder]
Description: ''
DescriptionMode: 'auto'
Description_I: ''
Parent: [1×1 Figure]
ParentMode: 'manual'
Parent_I: [1×1 Figure]
Visible: on
VisibleMode: 'auto'
Visible_I: on
Serializable: on
SerializableMode: 'auto'
Serializable_I: on
HandleVisibility: 'on'
HandleVisibilityMode: 'auto'
HandleVisibility_I: 'on'
ErrorCallback: ''
ErrorCallbackMode: 'auto'
ErrorCallback_I: ''
Internal: 0
ApplicationData: [1×1 struct]
SerializableApplicationData: [1×1 struct]
DefaultPropMap_Internal: [0×0 struct]
Copyable: 1
NodeParent: [1×1 AxesLayoutManager]
NodeChildren: [1×1 Camera2D]
CustomThemePropertyMappings: [1×1 struct]
HG1Erase: 'normal'
HG1EraseMode: 'auto'
HG1Erase_I: 'normal'
EraseMode: 'normal'
Behavior: [1×1 struct]
BehaviorMode: 'auto'
Behavior_I: [1×1 struct]
HelpTopicKey: ''
HelpTopicKeyMode: 'auto'
HelpTopicKey_I: ''
SerializableBehavior: [1×1 struct]
ButtonDownFcnMode: 'auto'
ButtonDownFcn_I: ''
ButtonDownFcn: ''
ButtonDownFcn_IS: ''
SerializableUIContextMenu: [0×0 GraphicsPlaceholder]
ContextMenu: [0×0 GraphicsPlaceholder]
UIContextMenu: [0×0 GraphicsPlaceholder]
TopLevelSerializedObject: on
BusyAction: 'queue'
BeingDeleted: off
Interruptible: on
CreateFcnMode: 'auto'
CreateFcn_I: ''
CreateFcn: ''
CreateFcn_IS: ''
DeleteFcnMode: 'auto'
DeleteFcn_I: ''
DeleteFcn: ''
DeleteFcn_IS: ''
Type: 'bubblelegend'
TagMode: 'auto'
Tag_I: ''
Tag: ''
UserData: []
SerializableUserData: []
Selected: off
SelectedMode: 'auto'
Selected_I: off
SelectionHighlight: on
SelectionHighlightMode: 'auto'
SelectionHighlight_I: on
HitTestMode: 'auto'
HitTest_I: on
HitTest: on
PickablePartsMode: 'auto'
PickableParts_I: 'visible'
PickableParts: 'visible'
CausesLayoutUpdate: on
Layout: [0×0 matlab.ui.layout.LayoutOptions]
and I got a long list of properties, like these ones:

However, if I try to modify the "DefaultBubbleLineWidth" or the "BubbleLineWidth":
hl.DefaultBubbleLineWidth = 2;
Setting the 'DefaultBubbleLineWidth' property of class ''BubbleLegend'' is not supported.
I get this error:
Setting the 'DefaultBubbleLineWidth' property of class 'BubbleLegend' is not supported.
Error in untitled (line 7)
hl.DefaultBubbleLineWidth = 2;
채택된 답변
Taylor
2025년 12월 9일 16:58
The LineWidth property of bubblelegend only adjusts the border around the legend. I have submitted a feature request on your behalf to the development team to add control for the scale line as well.
댓글 수: 5
Dyuman Joshi
2025년 12월 10일 17:08
Taylor
2025년 12월 11일 19:14
Given that this feature request is really just exposing a private property to be public, I would think it would be a fairly quick implementation. It's cutting it close for the R2026a release though so it might not make it into that, but I know for certain that development has seen my feature request and added it to their "to triage" list. MathWorks development is a large ship to steer so even minor changes like this can take longer than one might expect.
Walter Roberson
2025년 12월 11일 19:56
As R2026a pre-release is already out, if I understand correctly, new features are now locked; from now on it is only bug fixes and removing candidate changes.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)
