Change histogram legend marker [R2017b]
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I have plotted a histogram and some horizontal limit lines.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/168993/image.png)
When I run the code
[lgd, lObjs] = legend(voltageHist, ['File: ',file],'90 kV','100 kV', 'Location','southoutside','Orientation','horizontal');
my marker for the File string disappears. If I run the line :
lgd = legend(voltageHist, ['File: ',file],'90 kV','100 kV', 'Location','southoutside','Orientation','horizontal');
all works as expected. It seems second return value is creating the problem of the marker disappearing. I would like to change the legend marker to a line and not a box. The box that was there in the second scenari is shown below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/168994/image.png)
I cannot manage to change the marker and the presentation is important in this case.
Any help would be appreciated.
Kind regards, TJ
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!