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 #90999 is a reply to message #90997] Thu, 21 May 2015 14:47 Go to previous messageGo to previous message
munka is currently offline  munka
Messages: 36
Registered: December 2009
Member
On Thursday, May 21, 2015 at 2:43:04 PM UTC-7, myname...@gmail.com wrote:
> On Thursday, May 21, 2015 at 2:42:10 PM UTC-7, myname...@gmail.com wrote:
>> On Thursday, May 21, 2015 at 2:34:50 PM UTC-7, David Fanning wrote:
>>> 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.")
>>
>> this should reproduce the bug http://pastebin.com/GpaPKqfT
>>
>> adding
>>
>> Print, !x.range
>> Print, !X.CRange
>>
>> after both plot commands gives:
>>
>> 0.0000000 0.0000000
>> 0.0000000 180.00000
>> 0.0000000 0.0000000
>> 0.0000000 180.00000
>>
>> ~Bill
>
> Whoops. be sure to change the output path.

I made the arrays smaller and it still has the bug

http://pastebin.com/KUSFH0q0

here is the output

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

~Bill
[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 16:04:54 PDT 2025

Total time taken to generate the page: 0.00251 seconds