Hi Chris,
2017-06-16 14:06 GMT-03:00 Chris Cunningham <cunningham.cb(a)gmail.com>om>:
Hi,
I suspect your issue I want a bug per se.
I didn't understood that.
Your x axis starts at the first bar x location. The
bars are going to be
centered on the point - meaning it will overlap to the left (or negative)
side.
So my Axis X starts at 572.
My minPoint is 592.
So why the first bar is shifted to the left?
Anyway, I had to manually substract to adjust the minPoint:
minPoint := ((bins reject: #isEmpty) detectMin: #size) anyOne size - 28.
As for the gaps I suspect that has to do with the data. The bars have a
width and the space between each point is very small - so there will be
overlap. And space for x values that aren't in your data (giving you the
gaps).
Did you want instead each bar next to the next and individually labbeled?
I want each bar next to the next, I think I never saw a histogram with
overlapped bars.
Somehow matplotlib got this right:
http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc295
Cheers,
Hernán
On Jun 14, 2017 10:16 PM, "Hernán Morales Durand"
<hernan.morales(a)gmail.com>
wrote:
Hi guys,
I am experiencing a problem visualizing histograms in Roassal with Pharo
5. In the attached image you can observe the first bar shape starts from a
negative X axis value, where I want to start from 0. Besides, some bars are
gapped but I don't know why.
I am using with the following code:
| bins minPoint g ds |
bins := self groupedBySeqLengthDistribution: binNumber.
minPoint := ((bins reject: #isEmpty) detectMin: [ : c | c size ])
anyOne size.
" Build diagram "
g := RTGrapher new
extent: 500 @ 200;
minX: minPoint;
withoutOrigin;
yourself.
ds := RTData new
points: bins;
x: [ : c | c ifEmpty: [ minPoint ] ifNotEmpty: [ : d | d anyOne
size ] ];
y: #size.
ds barShape
borderColor: Color black;
color: aColor;
width: barWidth.
g add: ds.
" Configure axis settings "
g axisY
title: axixYLabel;
color: Color black;
noDecimal.
g axisX
noDecimal;
fromPoint: minPoint;
color: Color black;
title: axisXLabel.
" Open visualization in a new window "
g open.
Any idea what I am missing?
Cheers,
Hernán
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev