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 件のコメント
Zafimandimby Mampiandra
2022 年 4 月 28 日
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
DGM
2022 年 4 月 28 日
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.
Zafimandimby Mampiandra
2022 年 4 月 28 日
Can you send me a link to download it please? I cannot find.
Thanks
DGM
2022 年 4 月 28 日
There should be a button on the right hand side that says "download"
Zafimandimby Mampiandra
2022 年 4 月 28 日
Thank you very much. It works now
Zafimandimby Mampiandra
2022 年 4 月 28 日
Can you please help me to write the related code about the "legend" to match the bar chart.
Thanks
DGM
2022 年 4 月 28 日
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!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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)
