Ask Your Question

Legend for histogram

asked 2017-01-07 05:21:19 -0600

Acksl gravatar image

updated 2017-01-08 09:37:43 -0600

tmonteil gravatar image

I can't make the legend for histograms work as I want it to. I can make a legend with the labels appear but the corresponding indicator doesn't show the colors just two black vertical lines.

Here's a minimial example:

d1=[randint(0,10) for i in range(20)]
d2=[randint(0,10) for i in range(20)]

Any ideas?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-01-07 13:54:23 -0600

The colors are there but hidden by the indicator borders. Increase their size with

edit flag offensive delete link more


kcrisman gravatar imagekcrisman ( 2017-01-07 22:45:00 -0600 )edit

Perfect, thanks! :)

Acksl gravatar imageAcksl ( 2017-01-08 06:28:39 -0600 )edit

Great. Should a nonzero value set by default ? Or does this has effect somewhere else ?

tmonteil gravatar imagetmonteil ( 2017-01-08 09:38:52 -0600 )edit

Probably; says, "The pad and spacing parameters are measured in font-size units. e.g., a fontsize of 10 points and a handlelength=5 implies a handlelength of 50 points."

kcrisman gravatar imagekcrisman ( 2017-01-09 09:54:18 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-01-07 05:21:19 -0600

Seen: 232 times

Last updated: Jan 07 '17