▼ |  | PLo T: Graph Plotting

1 | Introduction
2 | 2D Plot Procedures
3 | 2D Renderers
4 | 3D Plot Procedures
5 | 3D Renderers
6 | Nonrenderers
7 | Axis Transforms and Ticks
8 | Plot Utilities
9 | Plot and Renderer Parameters
10 | Plot Contracts
11 | Porting From PLo T <= 5.1.3
12 | Compatibility Module

On this page:

x-ticks
y-ticks
z-ticks
invisible-rect
invisible-rect3d

Version: 5.3.1
top ← prev up next →

### 6`` Nonrenderers

The following functions create nonrenderers, or plot elements that draw nothing in the plot.

> > procedure

> > ( x-ticks ts [#:far? far?]) → nonrenderer?

> ts : ( listof tick? )
> far? : boolean? = #f

> > procedure

> > ( y-ticks ts [#:far? far?]) → nonrenderer?

> ts : ( listof tick? )
> far? : boolean? = #f

> > procedure

> > ( z-ticks ts [#:far? far?]) → nonrenderer?

> ts : ( listof tick? )
> far? : boolean? = #f

The x-ticks, y-ticks and z-ticks return a nonrenderer that adds custom ticks to a 2D or 3D plot.

Although ticks-add allows placing arbitrary major and minor ticks on an axis, it does not allow them to be formatted differently from the other ticks on the same axis. Use one of these functions to get maximum control.

Example:

> > ( parameterize ([ plot-x-ticks no-ticks ])
> ( plot ( list ( function sin ( - pi ) pi )
> ( x-ticks ( list ( tick ( - pi ) #t "-π")
> ( tick ( * -3/4 pi ) #f "")
> ( tick ( * -1/2 pi ) #t "-π/2")
> ( tick ( * -1/4 pi ) #f "")
> ( tick 0 #t "0")
> ( tick ( * 1/4 pi ) #f "")
> ( tick ( * 1/2 pi ) #t "π/2")
> ( tick ( * 3/4 pi ) #f "")
> ( tick pi #t "π")))
> ( axes ))))

When considering using one of these functions, remember that minor tick labels are never drawn, and that including a z-ticks nonrenderer will not add extra contour lines to contour plots.

> > procedure

> > ( invisible-rect x-min x-max y-min y-max) → nonrenderer?

> x-min : ( or/c rational? #f)
> x-max : ( or/c rational? #f)
> y-min : ( or/c rational? #f)
> y-max : ( or/c rational? #f)

Returns a nonrenderer that simply takes up space in the plot. Use this to cause the plot area to include a minimal rectangle.

Example:

> > ( plot ( list ( function sin ( - pi ) pi )
> ( invisible-rect #f #f -2 2)))

> > procedure

> > ( invisible-rect3d |  | x-min |  |  |  |
> > |  | x-max |  |  |  |
> > |  | y-min |  |  |  |
> > |  | y-max |  |  |  |
> > |  | z-min |  |  |  |
> > |  | z-max) |  | → |  | nonrenderer?

> x-min : ( or/c rational? #f)
> x-max : ( or/c rational? #f)
> y-min : ( or/c rational? #f)
> y-max : ( or/c rational? #f)
> z-min : ( or/c rational? #f)
> z-max : ( or/c rational? #f)

Returns a nonrenderer that simply takes up space in the plot. Use this to cause the plot area to include a minimal rectangle. See invisible-rect for a 2D example.
top ← prev up next →