Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • This is nice, thank you! Only problem: in the legend the entries show up with only blue frames... Commented Jan 7, 2019 at 11:25
  • 1
    Yes, I noticed this. Not sure what can be done (editing the legend entries should be possible but likely difficult). What you can do is maybe plot another bar plot, in advance, with all NaN y-values and then show the legend (which will have small black frames around entries, as in your image). Just add bar(years1,NaN*values1); hold on; after figure; and see if the result works for you. Commented Jan 7, 2019 at 12:00