When a graph is created (in Graph Builder) with multiple pages, using one of the variables as a page parameter, the legend is only shown for the first page.
How to repeat the legend for all pages?
Any suggestion much appreciated!
Hi @Piet_Hoogkamer,
The trick here is to use the Dialog option in Graph Builder, then use the By role for your Label column, rather than Page. Graph Builder will then repeat the legend for each graph.
I hope this helps!
@jules
I am not aware of how to do that in Graph Builder. What type of graph are you building? If it is a scatter plot, you could use
Graph==>Overlay Plot
Specify your X and Y variables, and then the Page variable, put in the By selection box.
Once it is run, you can hold down the CNTL key and right mouse click, and select Row Legend. The select your color variable, and the legend will be shown for each graph.
Thanks Jim, this is helpful!
Being addicted to the graph builder, I rarely look at the other options, so lesson learned (at least for the scatter plot).
However, I still would like to see the same for the graph builder, as there are clearly differences in options.
Using 'Overlay plot' and 'Graph Builder', with my data looks as below.
The graph builder plots are for me much nicer, with a more clear relation of the points to the sample class (with some optional jitter).
Best, Piet.
Overlay PlotGraph Builder Plot
I agree with your statement, and I suggest that you send an enhancement request to
support@jmp.com
Hi Julian,
Many thanks!
This indeed solves this problem (and open a door to new options!).
Best regards,
Piet
Three years later, we have JMP 15 and this solution doesnt work. It creates for ech "by" category an extra page. Do you know, how it works with JMP 15.
This is beautiful. However, I have two issues.
1. The x-axis categories for my Pages (using the "By" command) are not always the same, as I would like them to be. Specifically, I'm using "Year Quarter" as ordinal x-axis. So if one page does not have data in 2022-Q4, but another page has no data in 2022-Q2 and 2023-Q1, the axes from page to page are not the same. I can work around this by entering zero as my continuous data for a given category, but that's NVA. Can we force the x-axes to be the same on every page (it seems this is the default when "Page" is used instead of "By").
2. If a legend category is not used on a page, it does not appear in the legend. Again, I'd like the legend on all pages to be identical. "By" is certainly superior to "Page" in this regard, but it would be even better if the legends could be forced to be identical. In my case, my y-axis continuous data are lost hours of production for a manufactuing process. I'm using a stacked bar. My categories for the legend ("Overlay") are loss reasons (e.g. "Not following procedure", "Corrosion", "Rotating equipment failure", "Raw material shortage"). The advantage to having the legend identical, even if a particular category is not present, is that it reinforces to the audience that in fact this cause is ZERO on this Page, whereas it is non-ZERO on another page.