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.
%3CLINGO-SUB%20id%3D%22lingo-sub-53091%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EComment%20changer%20la%20couleur%20de%20nombreuses%20distributions%20d'histogrammes%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-53091%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESalut%2C%3C%2FP%3E%3CP%3EJe%20trace%2064%20distributions%20d'histogrammes%20et%20je%20les%20empile%20ensemble.%20J'aime%20changer%20la%20couleur%20de%20chaque%20histogramme%20diff%C3%A9remment.%20Vous%20pouvez%20le%20faire%20manuellement%2C%20mais%20comment%20modifier%20cela%20automatiquement%26nbsp%3B%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJ'appr%C3%A9cie%20ton%20aide.%20Merci%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-53131%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%20%3A%20Comment%20changer%20la%20couleur%20de%20nombreuses%20distributions%20d'histogrammes%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-53131%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EMerci%20Jim.%20Je%20vais%20essayer.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-53103%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%20%3A%20Comment%20changer%20la%20couleur%20de%20nombreuses%20distributions%20d'histogrammes%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-53103%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ELa%20r%C3%A9ponse%20simple%20est%20oui...%20cependant%2C%20en%20utilisant%20une%20boucle%20For()%20et%20une%20substitution%2C%20vous%20pouvez%20simplement%20parcourir%20les%2064%20histogrammes%20souhait%C3%A9s%20et%20g%C3%A9n%C3%A9rer%20le%20code%20n%C3%A9cessaire.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-53100%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%20%3A%20Comment%20changer%20la%20couleur%20de%20nombreuses%20distributions%20d'histogrammes%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-53100%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EMerci%20Jim.%20Cela%20signifie-t-il%20que%20je%20dois%20faire%20cela%20pour%2064%20histogrammes%20que%20je%20souhaite%20construire%20et%20les%20empiler%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-53098%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%20%3A%20Comment%20changer%20la%20couleur%20de%20nombreuses%20distributions%20d'histogrammes%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-53098%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ELa%20couleur%20de%20l'histogramme%20est%20disponible%20par%20programmation%20pour%20JSL.Vous%20pouvez%20assez%20facilement%20%C3%A9crire%20un%20script%20pour%20ce%20faire.Voici%20le%20r%C3%A9sultat%20de%20la%20simple%20utilisation%20de%20Customize%2C%20puis%20du%20fait%20que%20la%20plateforme%20g%C3%A9n%C3%A8re%20le%20script%20pour%20la%20modification%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EDistribution(%0A%20Stack(%201%20)%2C%0A%20Continuous%20Distribution(%0A%20%20Column(%20%3Aheight%20)%2C%0A%20%20Horizontal%20Layout(%201%20)%2C%0A%20%20Vertical(%200%20)%0A%20)%2C%0A%20Continuous%20Distribution(%0A%20%20Column(%20%3Aweight%20)%2C%0A%20%20Horizontal%20Layout(%201%20)%2C%0A%20%20Vertical(%200%20)%0A%20)%2C%0A%20SendToReport(%0A%20%20Dispatch(%0A%20%20%20%7B%22height%22%7D%2C%0A%20%20%20%22Distrib%20Histogram%22%2C%0A%20%20%20FrameBox%2C%0A%20%20%20%7BDispatchSeg(%0A%20%20%20%20Hist%20Seg(%201%20)%2C%0A%20%20%20%20%7BLine%20Color(%20%7B108%2C%2060%2C%2065%7D%20)%2C%20Fill%20Color(%20%22Medium%20Light%20Green%22%20)%7D%0A%20%20%20)%7D%0A%20%20)%2C%0A%20%20Dispatch(%0A%20%20%20%7B%22weight%22%7D%2C%0A%20%20%20%22Distrib%20Histogram%22%2C%0A%20%20%20FrameBox%2C%0A%20%20%20%7BDispatchSeg(%0A%20%20%20%20Hist%20Seg(%201%20)%2C%0A%20%20%20%20%7BLine%20Color(%20%7B108%2C%2060%2C%2065%7D%20)%2C%20Fill%20Color(%20%22Red%22%20)%7D%0A%20%20%20)%7D%0A%20%20)%0A%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
AT
AT
Level V

How to change the color of many histogram distributions?

Hi,

I am plotting 64 histogram distributions and stack them together. I like to change the color of each histogram different. You can manually do this but how one can change this automatically?

 

I appreciate your help. Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to change the color of many histogram distributions?

The Histogram Color is programatically available to JSL.  You can fairly easily write a script to do this.  Here is the result of just using Customize and then having the platform generate the script for the modification

Distribution(
	Stack( 1 ),
	Continuous Distribution(
		Column( :height ),
		Horizontal Layout( 1 ),
		Vertical( 0 )
	),
	Continuous Distribution(
		Column( :weight ),
		Horizontal Layout( 1 ),
		Vertical( 0 )
	),
	SendToReport(
		Dispatch(
			{"height"},
			"Distrib Histogram",
			FrameBox,
			{DispatchSeg(
				Hist Seg( 1 ),
				{Line Color( {108, 60, 65} ), Fill Color( "Medium Light Green" )}
			)}
		),
		Dispatch(
			{"weight"},
			"Distrib Histogram",
			FrameBox,
			{DispatchSeg(
				Hist Seg( 1 ),
				{Line Color( {108, 60, 65} ), Fill Color( "Red" )}
			)}
		)
	)
);
Jim

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: How to change the color of many histogram distributions?

The Histogram Color is programatically available to JSL.  You can fairly easily write a script to do this.  Here is the result of just using Customize and then having the platform generate the script for the modification

Distribution(
	Stack( 1 ),
	Continuous Distribution(
		Column( :height ),
		Horizontal Layout( 1 ),
		Vertical( 0 )
	),
	Continuous Distribution(
		Column( :weight ),
		Horizontal Layout( 1 ),
		Vertical( 0 )
	),
	SendToReport(
		Dispatch(
			{"height"},
			"Distrib Histogram",
			FrameBox,
			{DispatchSeg(
				Hist Seg( 1 ),
				{Line Color( {108, 60, 65} ), Fill Color( "Medium Light Green" )}
			)}
		),
		Dispatch(
			{"weight"},
			"Distrib Histogram",
			FrameBox,
			{DispatchSeg(
				Hist Seg( 1 ),
				{Line Color( {108, 60, 65} ), Fill Color( "Red" )}
			)}
		)
	)
);
Jim
AT
AT
Level V

Re: How to change the color of many histogram distributions?

Thanks Jim. Does it mean I have to do this for 64 Histograms that I want to build and stack them together?

txnelson
Super User

Re: How to change the color of many histogram distributions?

The simple answer is yes......however, using a For() loop and Substitution you can just loop through the 64 histograms you want and generate the necessary code

Jim
AT
AT
Level V

Re: How to change the color of many histogram distributions?

Thanks Jim. I will give it a try.

Recommended Articles