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
babn
Level III

Graph Builder Problem with Lines

Hi All,

When I create a graph in graph builder with continuous data in the Y and the X axis, and use one categorical in the Overlay, I get continuous lines. But as soon as I put a second categorical in "Color," the lines change to dotted, etc even though the line style shows an uninterrupted line. This didn't use to happen and I don't know why it is happening. I had asked about this problem before and, unfortunately, the solutions didn't let work for my purpose.

I am attaching a sample file from the JMP help index to which I saved the script for a couple of graphs that show what I mean.

Any help with this issue is much appreciated!

Barbara

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Graph Builder Problem with Lines

Hi @babn, if you right click on the Overlay section, then choose Overlay Encoding > Color, I think this will get you what you're looking for. This behavior was changed to allow for more ways to create advanced graphs. @scwise did a great little overview of this here at timestamp 18:30 - 22:00.

View solution in original post

6 REPLIES 6

Re: Graph Builder Problem with Lines

Hi @babn, if you right click on the Overlay section, then choose Overlay Encoding > Color, I think this will get you what you're looking for. This behavior was changed to allow for more ways to create advanced graphs. @scwise did a great little overview of this here at timestamp 18:30 - 22:00.

babn
Level III

Re: Graph Builder Problem with Lines

Hi Jed, the only problem with this solution is that it eliminates individual markers. With colors in the encoding, I get only dots. I can change them individually but that's seems quite cumbersome for larger data sets.

Re: Graph Builder Problem with Lines

Would adding another set of points work for what you're trying to do? You can use the Variables section to change how the overlay is applied to the points all at once.

screencap.gif

babn
Level III

Re: Graph Builder Problem with Lines

Thank you for the effort. Unfortunately, it doesn't solve my problem with the interrupted lines. 

hogi
Level XIII

Re: Graph Builder Problem with Lines

This discussion has continued in Graph builder problem with lines, markers, and dots 

... leading to this "workaround" via preferences/Graph Builder settings :

// execute the code if you know what you are doing - changing the preferences is dangerous
Set Platform Preferences(
		Graph Builder(
			Overlay Auto Line Styles Limit( 1, <<On ),
			Overlay Auto Marker Styles Limit( 62, <<Off ));
); //-------------------------------------------------- Open( "$SAMPLE_DATA/Blood Pressure.jmp" ); Graph Builder( Size( 843, 698 ), Graph Spacing( 4 ), Variables( X( :BP 8W ), Y( :BP 8M ), Overlay( :Subject ), Color( :Dose ) ), Elements( Line( X, Y, Legend( 11 ) ), Points( X, Y, Legend( 12 ) ) ) );

The idea: 

  • Reduce the auto limit for line styles to 1 - to plot all lines as solid lines.
  • However, keep the auto limit for markers -  to get different markers for different overlay groups.

  • use color to specify the color.
     

The result: 

  • individual traces for each subject
  • all lines are solid
  • different markers for the different subjects
  • color indicates: dose

hogi_2-1766266939493.png

Users will probably find a way to create the plot they want using tricks and workarounds.
However, the need for workarounds highlights the limitations of Graph Builder.
Overlay is used for different purposes:

  • to "group data" for smoother, line, bar and other plots
  • to control the style of lines
  • to control the style of markers 

This is great if you need one of these options or multiple options 'synchronously'.
However, it is inconvenient when you need multiple options in a non-synchronous way.

For example, at the moment it is not possible to assign markers for categories which don't coincide with the Overlay groups.

Let's try to create a plot with the following settings 

  • individual traces for each subject
  • different markers colors for the different subjects
  • color marker indicates: dose

hogi_3-1766267547798.png

 

This plot looks simple enough, doesn't it? But it's extremely difficult to create in Graph Builder.

Give it a try and share your experience!

 

Open( "$SAMPLE_DATA/Blood Pressure.jmp" );
Graph Builder(
	Graph Spacing( 4 ),
	Variables(
		X( :BP 8W ),
		Y( :BP 8M ),
		Overlay( :Subject, Overlay Encoding( "Color" ) ),
		Color( :Dose )
	),
	Elements( Line( X, Y), Points( X, Y ) )
);

 

idea/issue from: how to generate this graph in Graph Builder?

hogi_1-1766259106251.png

hogi
Level XIII

Re: Graph Builder Problem with Lines


@babn wrote:

Hi Jed, the only problem with this solution is that it eliminates individual markers. With colors in the encoding, I get only dots. I can change them individually but that's seems quite cumbersome for larger data sets.


 

agree! it is possible to adjust the markers individually. but why is it necessary?
I hope in a future version of JMP, there will be a  new Column Property: Value Markers  (please follow the link to the wish and vote)
... and a corresponding formalism in Graph Builder to use the setting.

Recommended Articles