On 23 February 2012 18:28, Niek de Klein <niekdekl...@gmail.com> wrote: > > r['plot']( p1, col=r['rgb'](0,0,1,1/4), > xlim=R.vectors.IntVector([0,10])) # first histogram > > r['plot']( p2, col=r['rgb'](1,0,0,1/4), > xlim=R.vectors.IntVector([0,10]), add=True) # second > > > This gives the same overlapping histogram plot, except that histograms are > not coloured. How can I color the histograms?
I think the problem is the 1/4. Python 2 defaults to integer division, so 1/4 is evaluated as 0, and your colours are completely transparent. To fix it, put "from __future__ import division" right at the top of your script, which will make 1/4 evaluate to 0.25. In Python 3, this behaviour is the default. Best wishes, Thomas ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list