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

Home » Public Forums » archive » Table Widget
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Table Widget [message #10823] Fri, 23 January 1998 00:00 Go to previous message
DMottershead is currently offline  DMottershead
Messages: 17
Registered: January 1998
Junior Member
Also, with regards to this table widget I have a draw widget defined
below the table widget. When a user selects a column of data this data
is displayed in the draw widget. My problem is that when the axes change
to plot different data ranges, the axis labels change size as well. The
code to plot the data is shown below:-

pro CTD_Table_Widget_Events, event

; This event handler handles draw widget expose events.

WIDGET_CONTROL, event.top, GET_UVALUE = ptr

; Draw the graphic.

result = widget_info(event.id,/table_select)

a=result(0)
b=result(1)
c=result(2)
d=result(3)

data = (*ptr).plotdata(a:c, b:d)

; set the plot data

(*ptr).plot.thisPlot->SetProperty, datay = data

(*ptr).plot.thisPlot->GetProperty, XRange=xrange, YRange=yrange

; Set up the scaling so that the axes for the plot and the
; plot data extends from 0->1 in the X and Y directions.

xs = Normalize(xrange)
ys = Normalize(yrange)

; Scale the plot data into 0->1.

(*ptr).plot.thisPlot->SetProperty, XCoord_Conv=xs, YCoord_Conv=ys
(*ptr).plot.xAxis1->SetProperty, Ticklen = 0.01
(*ptr).plot.xAxis1->SetProperty, minor = 4
(*ptr).plot.xAxis1->SetProperty, range = xrange
(*ptr).plot.xAxis1->SetProperty, XCoord_Conv = xs
(*ptr).plot.xAxis1->SetProperty, tickdir = 1
;(*ptr).plot.yAxis1->SetProperty, Location = [xs[0],ys[0]]
(*ptr).plot.xAxis1->SetProperty, Location = [0,0]
(*ptr).plot.yAxis1->SetProperty, Ticklen = 0.01
(*ptr).plot.yAxis1->SetProperty, minor = 4
(*ptr).plot.yAxis1->SetProperty, range = yrange
(*ptr).plot.yAxis1->SetProperty, YCoord_Conv = ys
(*ptr).plot.yAxis1->SetProperty, tickdir = 1
;(*ptr).plot.yAxis1->SetProperty, Location = [xs[0],ys[0]]
(*ptr).plot.yAxis1->SetProperty, Location = [0,0]

xaxistext = Obj_New('IDLgrText', font = (*ptr).plot.helvetica6pt)
yaxistext = Obj_New('IDLgrText', font = (*ptr).plot.helvetica6pt)

xAxisText->SetProperty, Font=(*ptr).plot.helvetica6pt
yAxisText->SetProperty, Font=(*ptr).plot.helvetica6pt

(*ptr).obj.omodel->add, xaxistext
(*ptr).obj.omodel->add, yaxistext

; render the graphics to the window

(*ptr).obj.owindow -> Draw, (*ptr).obj.oview

return
end

Say for example I have a y axis labelled from 0 to 10 the first pass.
Next pass I have values from 0 - 20. The labels will halve their size in
both x and y direction.

--
Regards

David

************************************************************ *******
David Mottershead Phone: +61 2 9949 0234
Manly Hydraulics Laboratory Fax: +61 2 9948 6185
110b King St, Manly Vale, 2093 email: dmottershead@mhl.nsw.gov.au
SYDNEY, AUSTRALIA WWW: http://www.mhl.nsw.gov.au
************************************************************ *******
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: David Fanning's IDL Programming Techniques Book
Next Topic: BEGINNER ASKS FOR HELP!!!

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

Current Time: Fri Oct 10 18:58:03 PDT 2025

Total time taken to generate the page: 1.36097 seconds