comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » output from cghistoplot draws outline correctly but the fill is shifted!?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
output from cghistoplot draws outline correctly but the fill is shifted!? [message #90993] Thu, 21 May 2015 14:00 Go to previous message
munka is currently offline  munka
Messages: 36
Registered: December 2009
Member
Hi y'all,

I'm using cghistoplot to make some histograms but a funny thing happens. One of my plots has the color filling shifted by one bin!

http://i.imgur.com/9IlvkQZ.png


The outline is in the correct spot but the fill isn't. If I switch to line_fill it seems to work

http://i.imgur.com/h6cWxFt.png

Even when I'm not plotting 3 plots the same data still causes this shift

Here is the bit where I plot the center plot...

cghistoPlot, 10^tbl.lsfr,ytitle='',xr=[0,180],$
yr=[0,100],xtitle='SFR' ,pos=midplotpos,ytickname=replicate(' ',10),xtickname=['','','','','','',' '],$
mininput=0.0,binsize=5.0,maxinput=180.0,DATACOLORNAME='black ',/noerase,$
thick=8,/outline,/FILLPOLYGON,polycolor='dodger blue',histdata=histdatas1,locations=locationss1,$
yminor=10

index=where(10^(sfrarr) gt 0.01 and 10^(sfrarr) lt 250)
cghistoPlot, 10^(sfrarr[index]),$
mininput=0.0,binsize=5.0,maxinput=180.0,/oplot,$
THICK=8,/fill,datacolorname='black',/outline,polycolor='red' ,$
line_thick=18,orientation=45


I'm not sure what is going wrong. I copy-pasted the code for each of the plots and only changed the plotting ranges and the data plotted. Does anyone have any clue as to whats going on here?



here is the whole code

http://pastebin.com/4zUA2dW7
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Run-time error '-5'
Next Topic: 3D point cloud visualization

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:40:34 PDT 2025

Total time taken to generate the page: 0.00444 seconds