In my example, I just create a Ttransform Variable within Graph Builder, which only has the Female values.  The formula I use in the Transform Variable is:
     If(:Sex == "F", :height, .)

I used the Big Class sample data table for my example.  Here is the Script the Graph Builder generated based upon the setting I interactively set
Graph Builder(
	Variables(
		X( :weight ),
		Y( :height ),
		Y(
			Transform Column(
				"Female Heights",
				Formula( If( :sex == "F", :height, . ) )
			),
			Position( 1 )
		)
	),
	Elements(
		Points( X, Y( 1 ), Y( 2 ), Legend( 5 ) ),
		Line Of Fit( X, Y( 1 ), Y( 2 ), Legend( 7 ), Degree( "Quadratic" ) )
	),
	SendToReport( Dispatch( {}, "Y title", TextEditBox, {Set Text( "Height" )} ) )
)
 
					
				
			
			
				
	Jim