User Tools

Site Tools


software:scilab:graphic:zoom-plot

Zoom in Figure

The following code shows how to create a separate zoom area, within a figure.

clf()

// main axes
x = 0:0.1:20
plot(x, acosh(x),"r", x, asinh(x), "g")
a = gca()
a.axes_bounds = [0, 0, 1, 1]

// zoom axes
z = copy(a)
z.axes_bounds = [.6, .3, .2, .5]
zoom_rect(z, [0, 0, 2, 1])

sca(a)
legend(["acosh", "asinh"], pos = "in_upper_left")
xpoly([0, 0, 2, 2], [0, 1, 1, 0])
xarrows([2, 12], [.5, 1.5], 8)

software/scilab/graphic/zoom-plot.txt · Last modified: 2020/07/25 08:59 by tormec