I’ve created a scatter plot, colour coded the fill by Category using a colour scheme and then used a mask based on a Text set to control the points that are plotted. I’ve turned off Category “A” (ref points) in the Text Set but it still appears in the legend. Is there any way to make the legend dynamic to reflect the active categories in the mask?1 month, 2 weeks ago dgteamModerator
Here is a way to make it work.
You have to switch from using the Custom Legend (which will always show all the entries) to using the default Legend command that is populated using a hidden Pivot command to provide the legend entries.
Here is a summary of the steps:
1 – Delete the Custom Legend.
2 – Add the Legend command from the tool bar. Delete the Legend entry at the bottom of the expanded Points command, so that the legend at this point is blank.
Now for the Pivot command …
3 – Highlight all three columns. Click the Pivot command icon in the tool bar.
4 – Add the same mask you are using for the points into the Pivot command ( you can copy and paste the mask using the gear menus or you can create a group and put the mask at the group level. I personally recommend the second option as you can see more clearly what the mask is.
5 – On the Pivot command you will need to change Group bars to ‘By Column’ and change the Fill to a ‘Color Scheme’, as shown below.
6 – Check the Hide button on the top right of the Pivot command.
Now you should have the dynamic Legend and only showing the points.
If any of the steps are not clear please let us know!
Worked perfectly – thanks 🙂
I guess my next question is why is this not the default behaviour when creating legends with masks?1 month, 2 weeks ago dgteamModerator
That is a good question!
The Legend command is unique among the commands as it will monitor the content of other commands to populate the legend. The other commands, including the Custom Legend, are independent of one another. The Pivot is sending its color scheme data to the Legend, but the Points command does not.
Given the masking functionality, I agree we need should consider whether the Legend could be ‘smarter’ for other commands as well.
Won’t happen for version 4.6, but we will think about for the next version.
Great and thanks for considering the feature request.
You must be logged in to reply to this topic.