[Biopython-dev] [Bug 2964] placing x-axis of graph track at the bottom or top of the track in GenomeDiagram

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Thu Dec 10 11:15:09 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2964





------- Comment #12 from Daniel.Nicorici at gmail.com  2009-12-10 06:15 EST -------
(In reply to comment #11)
> (In reply to comment #10)
> 
> > It looks a little bit confusing too me now because I see that there are two
> > sides of the problem (or two bugs?), as following:
> > 1) drawing a line orthogonal on y-axis at any position which represents the
> > x-axis (this does not affect how the values are plotted and in what interval)
> > 2) in the case of bar plotting (partially affects also linear plotting), the
> > values should be drawn automatically from zero (zero on y-axis, i.e. x=0 and
> > y=-inf...+inf) unless the user specify something else and not to be drawn by
> > default from some arbitrary point, e.g. median, mean, etc., as it is done now. 
> > 
> > I have the feeling that the solution presented here affects only the point 1)
> > and not 2).
> > 
> > Please, could you elaborate more such that maybe I could implement your
> > suggestion?
> 
> I see why you've distinguished between the two cases, but I think they can be
> handled by the earlier suggestion to implement the location of the x-axis in
> the context of also allowing the user to set y-axis limits (see comment #5). 
> It's the combination of allowing y-axis limits and the location of x-axis
> crossing that gives the greatest flexibility.  For example, if y-limit
> selection and x-axis crossing point were under user control...
> 
> ...if you wanted to continue with the current behaviour, you'd not set any
> y-limits, and not specify the location of the x-axis.
> 
> ...if you wanted to draw short read coverage, you'd set the lower y-limit to 0,
> and set the location of the x-axis to zero (if that was not the default).  This
> should draw bars with their bases on the bottom/inner of the track, and the
> scale running along the bottom/inner of the track. 
> 
> ...if you wanted to represent some data as a bar graph, with a special meaning
> for the mean (or median) value, you could optionally set y-limits, but have the
> x-axis cross at mean(data) or median(data).  This should draw bars with their
> bases on the x-axis, and the axis located at the mean/median value for the
> data.


I submitted the changes which do somehow what is described above, i.e. still by
default the x-axis is drawn in the middle of the track (it is still left for
now like this in order not to change the default behavior of GenomeDiagram). If
the x-axis is specified to be drawn at the bottom or top of the track then the
x-axis is drawn there and the values for bars/lines in the graph are drawn
using zero-based (if the some values are positive and other are negative) or
min (if all values are positive) or max (all values are negative). Hence only
when specifying the x-axis to be drawn at the bottom or top for the track, the
behavior of the graph and plotting are affected. The limits are computed
automatically.

> 
> Does this help clarify what I meant, above?

It helped. Thanks!

BR,
Daniel


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list