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

Home » Public Forums » archive » Contour labels not aligned with contours
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: Contour labels not aligned with contours [message #88536 is a reply to message #88529] Fri, 09 May 2014 02:19 Go to previous messageGo to previous message
Sir Loin Steak is currently offline  Sir Loin Steak
Messages: 42
Registered: January 2012
Member
Right, I've done some more investigating...

The problem seems to be related to the character size used to label the contour labels. I've done two more test plots, using the code below. The results are here: http://physics.open.ac.uk/~lsteele/contour_test.png

In the first plot I set c_charsize=0.2, while in the second plot I set c_charsize=0.5. As you can see, the labels look ok in the second plot, but are not aligned with the contours in the first plot.

The problem is, I need to produce the eps plot for a journal article, and it needs to be output in the correct size (in this case 2.5 inches square). As such, I have to use small c_charsize values to make the labels legible, and not cover up any shading which is plotted underneath the contours.

Does anyone know of a way around this?

Cheers,

Liam

Test code:

x = sin(findgen(50)/49*!pi)*5
y = cos(findgen(50)/49*!pi/2)*5
array = x#y

set_plot, 'ps'
!p.font=0
device, /encap, xsize=2.5, ysize=2.5, /inches, filename='test.eps'
pos = cglayout([1,1], oxmargin=[3,1], oymargin=[2,1])

clevels = findgen(13)*2
contour, array, findgen(50), findgen(50), levels=clevels, $
c_label=intarr(13)+1, charsize=0.6, c_charsize=0.2, $
color=cgcolor('black'), position=pos[*,0]

device, /close
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GDL weirdness (bug?) with modulo command
Next Topic: Problem with IDLnetURL Callback Function

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

Current Time: Fri Oct 10 00:07:37 PDT 2025

Total time taken to generate the page: 0.64107 seconds