Closed IoannisDafnomilis closed 2 years ago
Thanks for the feedback, @gdafn, and happy to see that you find the package useful!
For this particular use case, you are pushing the pyam plotting gallery beyond its current scope: I don't think that multi-tiered x-axis labels are supported by the connection between pyam and matplotlib. If you want to explore how to implement this, I'm happy to review any PRs (or guide you in how to get started with submitting a feature extension to the repo).
As a quick-fix: you could create a new scenario (called "reference" or "history") which only has the 2015 values, and then you plot that reference scenario together with the scenario data for 2030 and 2050 - maybe this produces a figure closer to what you have in mind...
Thanks for the reply @danielhuppmann ! I will try to implement the quick-fix, I had already started on that indeed.
Please join our mailing list of Slack workspace for updates, new releases or discussing follow-up questions! https://pyam-iamc.readthedocs.io/en/stable/contributing.html
Hello all and thank you for the great work.
I have been using pyam the past couple of weeks and had no problem with anything until recently. I'm trying to produce a clustered stacked bar plot for comparing the same variables for the same year between different scenarios.
The code im using is:
So this produces a graph which is almost what I want but not exactly (see below). the 2015 values are the same for all scenarios so ideally only 1 of the 3 bars should be present there, but changing the 'year' for 2 of the scenarios overwrites the other one so you end up with 2030 and 2050 bars only.
Additionally the graph shows only the year on the x-axis. I would like to add the scenario per respective column name as well.
I have tried everything I could think on the above (and checked pyam's documentation as well) but nothing seems to work exactly how I would like to.
Any ideas or documentation on this I might have missed?
Thank you!