cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Françoise
Level VI

graphique

bonjour,

 

j'ai superposé 3 variables sur l'axe Y.

est-il possible d'ajouter un trait vertical pour relier le mini au maxi pour chaque identifiant de l'axe X ? Il faudrait qu'on puisse choisir la couleur, l'épaisseur et la transparence du trait vertical.

 

voir l'image avec un exemple dans le cercle.

 

cordialementCapture d’écran 2025-08-06 195805.jpg

3 REPLIES 3
jthi
Super User

Re: graphique

You could try using Range Error Bar

jthi_0-1754504288691.png

Or you could add Interval Bar chart and disable the "middle" value (this might require some extra calculations / columns)

jthi_1-1754504426279.png

 

And then there is of course scripting option using graphic script which is more complicated

jthi_2-1754504988730.png

 

-Jarmo
jthi
Super User

Re: graphique

Here is one possible example for scripted option

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt << New Formula Column(Operation(Category("Aggregate"), "Minimum"), Columns(:height), Group By(:age));
dt << New Formula Column(Operation(Category("Aggregate"), "Maximum"), Columns(:height), Group By(:age));

gb = dt << Graph Builder(
	Size(525, 448),
	Show Control Panel(0),
	Variables(
		X(:age),
		Y(:height),
		Y(:"Maximum[height][age]"n, Position(1)),
		Y(:"Minimum[height][age]"n, Position(1))
	),
	Elements(Points(X, Y(1), Y(2), Y(3), Legend(3), Summary Statistic("Mean")))
);



segs = Report(gb)[FrameBox(1)] << Find Segs();
ys = [];
xs = {};
For Each({seg}, segs, 
	If(seg << Class Name == "MarkerSeg", 
		ys = ys |/ (seg << get y values)`;
		Insert Into(xs, seg << get x values);
	)
);

For Each({{ymin, ymax, x}}, Across(V Min(ys), V Max(ys), xs[1]), 
	Eval(EvalExpr(
		Report(gb)[FrameBox(1)] << Add Graphics Script(
			"Back",
			Pen Color("Purple");
			Pen Size(20);
			Transparency(0.2);
			V Line(Expr(x), Expr(ymin), Expr(ymax));
		);
	));
);

Write();

This "simple" example won't work with filters. 

-Jarmo
jthi
Super User

Re: graphique

And then there is Marker Draw Expr where you can control the color and transparency from legend and width from the draw expression

 

View more...
Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt << New Formula Column(Operation(Category("Aggregate"), "Minimum"), Columns(:height), Group By(:age));
dt << New Formula Column(Operation(Category("Aggregate"), "Maximum"), Columns(:height), Group By(:age));

gb = dt << Graph Builder(
	Size(746, 818),
	Show Control Panel(0),
	Variables(
		X(:age),
		Y(:height),
		Y(:"Maximum[height][age]"n, Position(1)),
		Y(:"Minimum[height][age]"n, Position(1))
	),
	Elements(
		Points(X, Y(1), Y(2), Y(3), Legend(3), Summary Statistic("Mean")),
		Points(X, Y(1), Legend(4), Summary Statistic("Mean"))
	),
	Local Data Filter(Add Filter(columns(:age), Display(:age, N Items(6)))),
	SendToReport(
		Dispatch({}, "400", ScaleBox,
			{Legend Model(
				4,
				Properties(
					0,
					{Line Color(35), Transparency(0.2)},
					Item ID("Mean(height)", 1)
				)
			)}
		)
	)
);

frame = Report(gb)[FrameBox(1)];
seg = (frame << FindSeg(Marker Seg(4)));
seg << Set Marker Draw Expr(
	Function({this seg, this row, x, y, size, row state},
		size = 0.1;
		Rect(
			x - size,
			:"Maximum[height][age]"n[this row], 
			x + size,
			:"Minimum[height][age]"n[this row],
			1
		);
	);
);

jthi_1-1754507910075.png

 

 

-Jarmo

Recommended Articles