On Tuesday, October 9, 2012 11:08:03 AM UTC-6, Rob wrote:Rob,
> It's been quite a while since I've programmed in IDL but I have a
> problem with something very basic. I am drawing a grid using the PLOTS
> command but the final lines are not being drawn (i.e. the top and
> rightmost lines). I might use a hack to get it to look right (i.e.
> enlarge the window by a few pixels) but it's not a very elegant
> solution. Below I list a simple procedure that shows the issue. You
> should see a window pop up with most of the grid except for lines
> along the top and along the right. Any help on my pedestrian
> problem? :o)
> pro test_grid_win
> ; Test program that writes out a PNG file that captures the screen
> ; a grid drawn on it.
> xsize = (ysize = 500)
> device,decomposed = 0 & loadct,0,/silent
> nx = 10
> window,0,xsize = xsize,ysize = ysize
> dx = 1./float(nx)
> for j = 0,nx do plots,[j*dx,j*dx],[0.0,1.0],/normal,color = 0B
> for j = 0,nx do plots,[0.0,1.0],[j*dx,j*dx],/normal,color = 0B
> ;filename = 'e:\test.png'
> ;WRITE_PNG, filename, TVRD(/TRUE)
Try this version of your program. The comments explain what you need to change and why.
;;plots places points on an already specified grid
;;use oplot to place the data on the existing plot (plots will also work)
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.