cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Mikasa
Level II

why points on graph not color coded according to legend?

Hi everyone

I have made some graphs with legends. the legends are color coded but the point on the graphs are all black. when I right click on the graph and go to "Row legend" and choose the column for the legend, the points get color-coded as the legend but when I copy the script in my JSL script, it does not work.

can anyone help to resolve it.

Thanks

4 REPLIES 4
Thierry_S
Super User

Re: why points on graph not color coded according to legend?

Hi Mikasa,
In order to tell Graph Builder which column to use for coloring points , the best approach is to cast that column as "Color" in the GB interface. This approach will be captured in the GB script. Of note, you can assign specific colors to values in the "color" column by going to Cols > Column Info > Column Properties > Value Colors.
I hope this helps.
Best,
TS
Thierry R. Sornasse
Mikasa
Level II

Re: why points on graph not color coded according to legend?

Thanks @Thierry_S 

I think I have to explain it better. I am using report window and bivariate to plot my graphs in a JSL script. I attached an example of my data table and I run the below script. The legends color are messed up after on the graphs and I think that is a reason that they get black in my main script.

 

I do not know how to solve it,

 

myPath = "C:\Users\....";

dt = Open( myPath || "tset.jmp", Run JSL( 1 ) );
Bivariate(
    Y( :Data1 ),
    X( :time1 ),
    SendToReport(
        Dispatch(
            {},
            "Bivar Plot",
            FrameBox,
            {Row Legend(
                chamber1,
                Color( 1 ),
                Color Theme( "JMP Default" ),
                Marker( 0 ),
                Marker Theme( "" ),
                Continuous Scale( 0 ),
                Reverse Scale( 0 ),
                Excluded Rows( 0 )
            )}
        )
    )
);

Bivariate(
    Y( :Data2 ),
    X( :time2 ),
    SendToReport(
        Dispatch(
            {},
            "Bivar Plot",
            FrameBox,
            {Row Legend(
                chamber2,
                Color( 1 ),
                Color Theme( "JMP Default" ),
                Marker( 0 ),
                Marker Theme( "" ),
                Continuous Scale( 0 ),
                Reverse Scale( 0 ),
                Excluded Rows( 0 )
            )}
        )
    )
);


Bivariate(
    Y( :Data3 ),
    X( :time3 ),
    SendToReport(
        Dispatch(
            {},
            "Bivar Plot",
            FrameBox,
            {Row Legend(
                chamber3,
                Color( 1 ),
                Color Theme( "JMP Default" ),
                Marker( 0 ),
                Marker Theme( "" ),
                Continuous Scale( 0 ),
                Reverse Scale( 0 ),
                Excluded Rows( 0 )
            )}
        )
    )
);

 

Thierry_S
Super User

Re: why points on graph not color coded according to legend?

Hi,
I'm not able to reproduce your problem in JMP 14.1 with the script and test data table you shared. I double checked each occurence of the Bivariate analysis and all 3 work fine (after correcting a minor typo in the last occurence: "chmaber3" instead of "chamber3").
The only black symbols are those for the rows where the values of "chamberN" is left blank which is an expected behavior.
Could you confirm that you experience the problem with the test data table you shared? If you do, it might be local preference that may have been changed: you can reset JMP preference to "factory standard" in the File > Preference menu. If you don't, it is likely that the problem is associated with that specific table and it becomes rather complicated to resolve without seeing the actual file which may not be shareable.
Best,
TS
Thierry R. Sornasse
Mikasa
Level II

Re: why points on graph not color coded according to legend?

Thanks @Thierry_S 

this is not what happens to my graphs. if the chamber 1 has (T) in Orange for instance, and chamber 2 has (N) in blue, in both graphs they show in the second color.   the color codes are messed up. the black also happens in some cases as you said, when the chamber after that is blank. For ex, if chamber 1 and 2 have values but the third does not, they show black on the graphs 1 and 2.

I reset the setting to default but still the same.