Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to make thus (integer-valued) histogram bars symmetric?

How to make thus (integer-valued) histogram bars symmetric?

The output of

 sage: histogram([1,1,1,1,1,1,2,1,1,2,2,2,2,4,4,3,4])

is the plot below at whose. The bar at 1 is not centered, but shifted to the right; the bar at 4 is shifted to the left; the middle ones show milder shifts, image description

My primitive solution is to replace (don't laugh) by

 histogram([.85,.85,.85,.85,.85,.85,2,.85,.85,2,2,2,2,4.15,4.15,3,4.15])

to get what I wish:

image description

How to do this properly?

How to make thus (integer-valued) histogram bars symmetric?

How to make thus this (integer-valued) histogram bars symmetric?

The output of

 sage: histogram([1,1,1,1,1,1,2,1,1,2,2,2,2,4,4,3,4])

is the plot below at whose. The bar at 1 is not centered, but shifted to the right; the bar at 4 is shifted to the left; the middle ones show milder shifts, image description

My primitive solution is to replace (don't laugh) by

 histogram([.85,.85,.85,.85,.85,.85,2,.85,.85,2,2,2,2,4.15,4.15,3,4.15])

to get what I wish:

image description

How to do this properly?

How to make thus (integer-valued) histogram bars symmetric?

How to make this (integer-valued) histogram bars symmetric?

The output of

 sage: histogram([1,1,1,1,1,1,2,1,1,2,2,2,2,4,4,3,4])

is the plot below at whose. The bar at 1 is not centered, but shifted to the right; the bar at 4 is shifted to the left; the middle ones show milder shifts, image description

My primitive solution is to replace (don't laugh) by

 histogram([.85,.85,.85,.85,.85,.85,2,.85,.85,2,2,2,2,4.15,4.15,3,4.15])

to get what I wish:

image description

How to do this properly?

How to make thus (integer-valued) this histogram bars symmetric?symmetric around its value?

How to make this these (integer-valued) histogram bars symmetric?

The output of

 sage: histogram([1,1,1,1,1,1,2,1,1,2,2,2,2,4,4,3,4])

is the plot below at whose. The bar at 1 is not centered, but shifted to the right; the bar at 4 is shifted to the left; the middle ones show milder shifts, image description

My primitive solution is to replace (don't laugh) by

 histogram([.85,.85,.85,.85,.85,.85,2,.85,.85,2,2,2,2,4.15,4.15,3,4.15])

to get what I wish:

image description

How to do this properly?

How to make this histogram bars symmetric around its value?

How to make these (integer-valued) histogram bars symmetric?

The output of

 sage: histogram([1,1,1,1,1,1,2,1,1,2,2,2,2,4,4,3,4])

is the plot below at whose. The bar at 1 is not centered, but shifted to the right; the bar at 4 is shifted to the left; the middle ones show milder shifts, image description

My primitive solution is to replace (don't laugh) by

 histogram([.85,.85,.85,.85,.85,.85,2,.85,.85,2,2,2,2,4.15,4.15,3,4.15])

to get what I wish:

image description

How to do this properly?