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
Re: output from cghistoplot draws outline correctly but the fill is shifted!? [message #90995 is a reply to message #90993] Thu, 21 May 2015 14:34 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
mynameismunka@gmail.com writes:

>
> 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

I would be curious to know at this spot in the code if the requested X
range is the same as the calculated X range. In other words:

Print, xrange
Print, !X.CRange

Are these the same when the following line is executed?

> 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?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[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 17:33:23 PDT 2025

Total time taken to generate the page: 0.00482 seconds