changing datatips of box plot
12 ビュー (過去 30 日間)
古いコメントを表示
Hey there, I am stuck on this problem for about a problem and there isn't much help for my particular plight online. I have plotted 13 different electrodes for EEG and their data into boxplots using the subplot function. I am trying to make custom data tips for the outliers in the boxplots. I tried using the UpdateFcn but it doesn't seem to work with boxplots and all the queries i found online work for scatter plots not really for boxplots.
A snippet of the plots i am working with can be found here,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/162078/image.png)
So far i have found that when i get to datacursormode.dataCursors.get, i can access the structure that has all the values stored and i can see all the information that is being populating the data tips,as seen below
cursorMode.dataCursors.get
Annotation: [1x1 hg.Annotation]
DisplayName: ''
HitTestArea: 'off'
BeingDeleted: 'off'
ButtonDownFcn: []
Children: [0x1 double]
Clipping: 'on'
CreateFcn: []
DeleteFcn: []
BusyAction: 'queue'
HandleVisibility: 'off'
HitTest: 'on'
Interruptible: 'on'
Parent: 3.9730e+03
SelectionHighlight: 'on'
Tag: ''
Type: 'hggroup'
UserData: []
Selected: 'off'
FontAngle: 'normal'
FontName: 'Helvetica'
FontSize: 8
FontUnits: 'points'
FontWeight: 'normal'
EdgeColor: [0.8000 0.8000 0.8000]
BackgroundColor: [1 1 0.9333]
TextColor: [0 0 0]
Marker: 'square'
MarkerSize: 10
MarkerEdgeColor: [1 1 0.8627]
MarkerFaceColor: [0 0 0]
MarkerEraseMode: 'normal'
Draggable: 'on'
String: {'Outlier Value: 4.0256' '' 'Observation Row: 25' 'Group: ' '' 'Distance To Median: 5.9022' 'Num IQRs To Median: 4.8328'}
Visible: 'on'
StringFcn: []
UpdateFcn: []
UIContextMenu: [1x1 uicontextmenu]
Host: [1x1 line]
Interpolate: 'off'
String: {'Outlier Value: 4.0256' '' 'Observation Row: 25' 'Group: ' '' 'Distance To Median: 5.9022' 'Num IQRs To Median: 4.8328'}
I want to change the string values that are displayed to change the labels and insert another value in that string to display. I want to use the value of Observation row as an index to extract the name of the subject who is outlier from a matrix that i created earlier which i should be able to access from the workspace, and then add that value to the string that should then display in the data tip.
Any help i can get, i would really appreciate.....
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!