Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
matthewh
Level I

Graph legends

Hi,

I am creating a stacked bar chart from JSL and want to be able to access the legend from my script. The problem I have is that each bar can contain quite a few categories, but by default JMP puts the legend key into just a single column under the graph, which is not attractive.

Interactively, I can simply double-click in the legend area to access the "Legend settings", then change the "Item Wrap" setting to a more useful number, but I would like to be able to set this from my JSL script.

Does anyone know if (and how) this is possible, as I can't find anything useful in the scripting manual!

Many thanks,

Matthew.
3 REPLIES 3
Highlighted
pmroz
Super User

Re: Graph legends

Hello Matthew,

Once you have created your bar chart to you liking, you should be able to see the JSL that created it. Click on the little red triangle in the upper left hand corner of the bar chart, then go to Script > Save Script to Script Window.

Regards,
Peter
Highlighted
matthewh
Level I

Re: Graph legends

Hi Peter,

thanks for your reply! Unfortunately I tried that and it doesn't seem to work - changing the Item Wrap setting does not change the resulting JSL code (it is identical to the default code). Also, if I do Script > Redo analysis, it redraws the graph with the previous Item Wrap setting.

I'm sure it must be possible from JSL via some sort of "SendToReport( Dispatch(" type command, but I can't work it out.

Regards,

Matthew.
Highlighted
XanGregg
Staff

Re: Graph legends

Sorry, looks like you can't get there in Chart. Here's the equivalent in Graph Builder:

Article Labels

    There are no labels assigned to this post.