cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
razmah
Level II

Changing the names in legend of plot

Hi

I have 6 variables: Step1=12, Step2=13, Step3=10, A=500, B=900, C=1300.

and I'm ploting col "x" vs first three variables ,that are names of columns, like below; but I want to change the name of them to variables A, B, and C in the legend of plot. (see pic). how can I do that? how can I change :Name("12") to show 500 (the value of A) instead of 12?

Thanks

t = current data table();

Overlay Plot(

X( :x ),

Y( Column( dt, Char(Step1)), Column( dt, Char(Step2)), Column( dt, Char(Step3)) ) ,

Connect Points( 1 ),

:Name("12")(Connect Color( 3), Overlay Marker Color( 3 ),

Overlay Marker( 12 ), Line Width( "Thin" )),

:Name("13")(Connect Color( 0 ), Overlay Marker Color( 0 ),

Overlay Marker( 16 ), Line Width( "Thin" )),

:Name("10")(Connect Color( 20 ), Overlay Marker Color( 20 ),

Overlay Marker( 15 ), Line Width( "Thin" )));

9251_Capture.PNG

15 REPLIES 15

Re: Changing the names in legend of plot

Oh, yes you are right, this seems to be a not intended behaviour. Could you report please to support@jmp.com with reference to this discussion. Thanks
/****NeverStopLearning****/
sibanibisoyi
Level I

Re: Changing the names in legend of plot

Yes, I think so.

When I have huge set of points. Graph Builder doesn't show one to one point connection (atleast I don't know of it).

I have tried to show what I mean in the attached example.

 

Re: Changing the names in legend of plot

Interesting, the script in your table does provide a different behaviour (bug-like) than when I start from scratch. This is true for JMP 12.2. and JMP 13.1. So please provide this also to our support team. Xan, did I miss something? 

So,  one workaround is to create it manually. May not the best, but for now ...

 

/****NeverStopLearning****/
XanGregg
Staff

Re: Changing the names in legend of plot

Thanks for providing the larger table. To keep the A and B lines separate, use the Overlay role. Here's a script.

linepointsoverlay.png

 

Graph Builder(
	Variables( X( :Column 1 ), Y( :Pressure ), Overlay( :Chamber )),
	Elements( Points( X, Y, Legend( 7 ) ), Line( X, Y, Legend( 8 ) ) )
)
XanGregg
Staff

Re: Changing the names in legend of plot


@sibanibisoyi wrote:

 

3) I know how to change the legends in Graph Builder.But as mentioned that I need to use Overlay Plot because I need connecting lines between the Points which is not possible in Graph Builder (as far as I know). 

You can combine elements in Graph Builder by holding down the shift key when you select them in the top row of element icons. So turn on Points and then shift-click on Line. In the properties for Line there is a checkbox called "Row order" which will connect the point row-by-row if that's what you're going for. Otherwise it will connect them by unique x values.

Re: Changing the names in legend of plot

To me it's not fully clear how the data table looks like which is mentioned above. If we could have an example table it should be not that hard.

/****NeverStopLearning****/