Bar Fill Pattern problem in plot
显示 更早的评论
Good morning.
I am plotting bar chart that I want to change the fill pattern for each bar. Can anybody help me to write the affiliated code?

This is an example of I want to plot
Thank you very much
采纳的回答
There are tools on the File Exchange for doing that.
See this example:
7 个评论
When I follow the same example, it specifies that "hatchfill2 is not specified"
Undefined function 'hatchfill2' for input arguments of type 'double'.
That is the notification I get
Thanks
You have to follow the link and download hatchfill2(). Put the files somewhere on the search path or add their location to the path using pathtool.
Can you send me a link to download it please? I cannot find.
Thanks
There should be a button on the right hand side that says "download"
Thank you very much. It works now
Can you please help me to write the related code about the "legend" to match the bar chart.
Thanks
I see you already saw the examples on this post:
I think Simeon's example is the simpler of the two, though it would probably be easiest if you showed what your plotting code looks like so far and we can just adapt that instead.
For what it's worth, if you're having trouble getting everything from GitHub, you can just get it from here.
The legendflex() package includes getpos(), so you shouldn't need to get that separately. Just get legendflex and stick it in a folder and add the folder (and its subfolders) to the path.
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
标签
另请参阅
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)
