[Tioga-users] Grid lines
Bill Paxton
paxton at kitp.ucsb.edu
Thu Apr 12 19:51:37 EDT 2007
On Apr 11, 2007, at 10:08 AM, Ivars Finvers wrote:
>
> Is it possible to produce grid lines in a Tioga plot? I've looked
> through the examples and documentation and was unable to any mention
> of grid lines.
>
Hi Ivars,
There isn't anything special for grid lines in Tioga (at least not
yet!), but you can
do-it-yourself pretty easily. Here's the "Blues Plot" from samples/
plots.rb with
grid lines added by hand.
def blues_with_grid
read_data
t.do_box_labels('Blues Plot', 'Position', '\textcolor[rgb]
{0,0,1}{Blues}')
show_model_number
xs = @positions
ys = @blues
t.show_plot(plot_boundaries(xs,ys, at margin,-1,1)) {
t.context {
t.line_width = 0.5
t.line_type = Line_Type_Dot
t.line_color = Gray
[0,2,4,6].each {|x| t.stroke_line
(x,t.bounds_top,x,t.bounds_bottom) }
[-1,-0.5,0,0.5,1].each {|y| t.stroke_line
(t.bounds_left,y,t.bounds_right,y) }
}
t.show_polyline(xs,ys,Blue) }
end
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Blues_with_grid.pdf
Type: application/pdf
Size: 13112 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/tioga-users/attachments/20070412/a1684860/attachment-0001.pdf
-------------- next part --------------
Cheers,
Bill
More information about the Tioga-users
mailing list