How can I add an additional overall legend for additional data overlaid on a 3x1 subplot, which already has a legend for each of the 3 plots?
Show older comments
I'm working on a script that creates a 3x1 subplot of a variety of data read in from text files. The final plot dynamically changes, depending on what data is read in from the file. Once each of them has been plotted, I need to overlay each of the plots with symbols denoting different actions taken over the course of the plot. These actions will need a legend associated with them. However, only 1 legend is necessary because they are all the same symbols. Each of the subplots has its own legend as well, corresponding with data from each of the subplots. I'm wondering if it's possible to have a fourth legend on this plot for the symbols that are overlaid on the 3 plots. When these symbols are overlaid on the plots, there are 8 possible symbols. Not all have to be used and it is not known before which will be used. I was thinking I could have a hard coded legend for all 8 possible symbols placed on the side of the subplot, and then all are noted even if they're not all used. Any ideas on how to go about this would be appreciated. Thank you. I don't know that it's helpful to add the code I'm working on here, as its very long, but I would be happy to share it if it would help.
4 Comments
dpb
on 3 Aug 2013
The one thought that comes to mind is to overlay another axes that bounds the subplot region axes and add the "super-legend" to it. Finding a piece of ground to place it on might be a problem.
I'd think you could take the essence of the appearance you're trying to achieve and provide a sample piece of code w/ random iputs or just straight lines and post that in--oh, I'd say 25 lines or so. (I can identify that song in ??? notes! :) ) It doesn't take all the complexity of the full thing to see the gist of the display.
Sarah
on 5 Aug 2013
dpb
on 5 Aug 2013
Again, make a toy example w/ random data that runs standalone that gives the gist of what you'd like. Shouldn't take but a fraction of the above; you don't need all the fancies; just the basic idea.
Help the helper...
Sarah
on 5 Aug 2013
Accepted Answer
More Answers (0)
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!