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
natalie_
Level V

Graph Builder- remove data series

Hi again,

I have two sets of x and y data.  Using the graph builder, I drag X1 to group x on the bottom and Y1 on group y on the left.  Then I drag X2 to group x on the bottom, and Y2 to group y on the left.  I dragged the second sets of data to the middle of the group so that it is not a split plot.

Now I have four sets of data, and I only want two.  In the legend it says, Y1/X1, Y2/X1, Y1/X2 and Y2/X2.  Is it possible to remove two of those series so that I only have Y1/X1 and Y2/X2? 

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: Graph Builder- remove data series

Right click on the legend entry that you don't want (Y1/X2) and select Transparency.  Set the transparency to 0.  Then do the same for Y2/X1.  Then double-click the legend and uncheck the entries for Y1/X2 and Y2/X1.

Try running this code:

dt = New Table( "X1 Y1 X2 Y2", Add Rows( 5 ),

      New Column( "x1", Numeric, Continuous, Format( "Best", 12 ),

            Set Values( [1, 2, 3, 4, 5] )

      ),

      New Column( "y1", Numeric, Continuous, Format( "Best", 12 ),

            Set Values( [1, 2, 3, 1, 2] )

      ),

      New Column( "x2", Numeric, Continuous, Format( "Best", 12 ),

            Set Values( [2, 3, 4, 5, 6] )

      ),

      New Column( "y2", Numeric, Continuous, Format( "Best", 12 ),

            Set Values( [4, 5, 6, 4, 5] )

      )

);

dt << Graph Builder(

      Show Control Panel( 0 ),

      Variables(

            X( :x1 ),

            X( :x2, Position( 1 ) ),

            Y( :y1 ),

            Y( :y2, Position( 1 ) )

      ),

      Elements( Points( X( 1 ), X( 2 ), Y( 1 ), Y( 2 ), Legend( 7 ), Jitter( 1 ) ) ),

      SendToReport( Dispatch( {}, "400", ScaleBox,

                  {Legend Model( 7,

                        Properties( 1, {Transparency( 0 )} ),

                        Properties( 2, {Transparency( 0 )} )

                  )}

            ),

            Dispatch( {}, "400", LegendBox, {Position( {0, -1, -1, 1} )} )

      )

);

View solution in original post

2 REPLIES 2
pmroz
Super User

Re: Graph Builder- remove data series

Right click on the legend entry that you don't want (Y1/X2) and select Transparency.  Set the transparency to 0.  Then do the same for Y2/X1.  Then double-click the legend and uncheck the entries for Y1/X2 and Y2/X1.

Try running this code:

dt = New Table( "X1 Y1 X2 Y2", Add Rows( 5 ),

      New Column( "x1", Numeric, Continuous, Format( "Best", 12 ),

            Set Values( [1, 2, 3, 4, 5] )

      ),

      New Column( "y1", Numeric, Continuous, Format( "Best", 12 ),

            Set Values( [1, 2, 3, 1, 2] )

      ),

      New Column( "x2", Numeric, Continuous, Format( "Best", 12 ),

            Set Values( [2, 3, 4, 5, 6] )

      ),

      New Column( "y2", Numeric, Continuous, Format( "Best", 12 ),

            Set Values( [4, 5, 6, 4, 5] )

      )

);

dt << Graph Builder(

      Show Control Panel( 0 ),

      Variables(

            X( :x1 ),

            X( :x2, Position( 1 ) ),

            Y( :y1 ),

            Y( :y2, Position( 1 ) )

      ),

      Elements( Points( X( 1 ), X( 2 ), Y( 1 ), Y( 2 ), Legend( 7 ), Jitter( 1 ) ) ),

      SendToReport( Dispatch( {}, "400", ScaleBox,

                  {Legend Model( 7,

                        Properties( 1, {Transparency( 0 )} ),

                        Properties( 2, {Transparency( 0 )} )

                  )}

            ),

            Dispatch( {}, "400", LegendBox, {Position( {0, -1, -1, 1} )} )

      )

);

natalie_
Level V

Re: Graph Builder- remove data series

Thank you!  I thought I just needed to remove it from the legend to remove it from the plot.

I will definitely be using that piece of code, too.  Thanks again!