cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hogi
Level XIII

Graph Builder. Combine Smoother and Line - how?

I have groups of measurement that I want to plot "together". 

The individual measurement curves of a group should have the same color and be semi-transparent.
For each group there should be an additional smoother curve with the same color.

 

Is this possible in Jmp? - without "workarounds"?

 

version 1:

  • measurements of one groups have same color
  • one curve per measurement
  • transparency works
  • 1 smoother line instead of 3
  • the smoother curve doesn't have the "right" color [consequential error]

hogi_2-1689325538795.png

version 2:

  • measurements of one groups have same color
  • nasty jumps back for the individual curves
  • transparency works
  • each group has it's own smoother curve
  • smoother curves have the wrong color

 

hogi_1-1689325503986.png

 

 

dt =Open( "$SAMPLE_DATA/Functional Data/Weekly Weather Data.jmp" );
dt << New Column( "group",Character,"Nominal",Formula( Substr( :STATION, 8, 1 ) ));

//version 1
dt << Graph Builder(
	Variables(
		X( :DATE ),
		Y( :TAVG ),
		Overlay( :STATION ),
		Color( :group )
	),
	Elements(
		Line( X, Y, Legend( 31 ) ),
		Smoother( X, Y, Overlay( 0 ), Legend( 32 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				31,
				Properties( 0, {Transparency( 0.2 )}, Item ID( "2", 1 ) ),
				Properties( 1, {Transparency( 0.2 )}, Item ID( "3", 1 ) ),
				Properties( 2, {Transparency( 0.2 )}, Item ID( "4", 1 ) )
			)}
		)
	)
	
);


//version 2
dt << Graph Builder(
	Variables( X( :DATE ), Y( :TAVG ), Overlay( :group ), Color( :group ) ),
	Elements(
		Line( X, Y, Legend( 31 ), Row order( 1 ) ),
		Smoother( X, Y, Legend( 32 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				31,
				Properties( 0, {Transparency( 0.2 )}, Item ID( "2", 1 ) ),
				Properties( 1, {Transparency( 0.2 )}, Item ID( "3", 1 ) ),
				Properties( 2, {Transparency( 0.2 )}, Item ID( "4", 1 ) )
			)}
		)
	)
)

 

10 REPLIES 10
hogi
Level XIII

Re: Graph Builder. Combine Smoother and Line - how?

A nice improvement in JMP19 is the Type Properties() feature, which allows us to apply transparency much easier:

hogi_0-1766437141151.png

  • same group = same color
  • transparency via Type Properties - no need to set it manually for every curve.
  • each group has it's own smoother curve (overlay encoding = auto or color)
  • smoother curves with matching color
  • just the zig-zag lines need some extra effort *)

*) and this topic will be addressed in a future version of JMP:
https://community.jmp.com/t5/JMP-Wish-List/Graph-Builder-Line-possibility-to-add-breaks/idc-p/921029... 
cool!

Graph Builder(
	Variables(
		X( :DATE ),
		Y( :TAVG ),
		Overlay( :group, Overlay Encoding( "Color" ) )
	),
	Elements(Smoother( X, Y, Legend( 2 ) ),  Line( X, Y, Legend( 1 ), Ordering( "Row Order" ) ) ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				1,
				Type Properties( 0, "H Line", {Transparency( 0.2 )} )
			)}
		)
	)
);

 

Recommended Articles