For an example, open Derivita - Authoring Examples > 2D Plotting.
Plots one or more 2D renderers
Named Arguments:
x_min
x_max
y_min
y_max
width
height
title
x_label
y_label
Sets default values for plotting
Named Arguments:
width
height
foreground
background
foreground_alpha
background_alpha
plot_line_width
tick_size
font_size
font_face
font_family
legend_anchor
legend_box_alpha
bounds_cube
x_axis
y_axis
x_far_axis
y_far_axis
x_origin_axis
y_origin_axis
z_axis
x_tick_labels
y_tick_labels
x_far_tick_labels
y_far_tick_labels
x_tick_label_angle
y_tick_label_angle
x_far_tick_label_angle
y_far_tick_label_angle
x_tick_label_anchor
y_tick_label_anchor
x_far_tick_label_anchor
y_far_tick_label_anchor
decorations
samples
angle
altitude
ambient_light
diffuse_light
specular_light
allow_pan
allow_zoom
allow_rotate
title
x_label
y_label
z_label
x_far_label
y_far_label
line_samples
line_color
line_width
line_style
line_alpha
interval_color
interval_style
interval_line1_color
interval_line1_width
interval_line1_style
interval_line2_color
interval_line2_width
interval_line2_style
interval_alpha
point_color
point_size
point_line_width
point_alpha
vector_field_samples
vector_field_color
vector_field_line_style
vector_field_scale
vector_field3d_samples
contour_samples
contour_levels
contour_colors
contour_widths
contour_styles
contour_alphas
contour_interval_colors
contour_interval_styles
contour_interval_alphas
x_axis_ticks
y_axis_ticks
x_axis_labels
y_axis_labels
x_axis_alpha
y_axis_alpha
polar_axes_number
polar_axes_ticks
polar_axes_labels
polar_axes_alpha
label_anchor
label_angle
label_alpha
label_point_size
surface_color
surface_style
surface_line_color
surface_line_style
contour_interval_line_colors
contour_interval_line_styles
Plotting functions, with the exceptions of scatterplot_2d and vector_field_2d, have the following named arguments.
x_min
x_max
y_min
y_max
samples
color
width
style
alpha
label
Plots y = expr
expr an expression in x
Named Arguments:
Plots x = expr
expr an expression in y
Named Arguments:
Plots a line chart
points a list of coordinate pairs: for example, [[0, 0], [1, 2], [5, -1]]
Named Arguments:
See Shared named arguments. Note that this function omits the argument samples.
Plots r = expr from theta_min to theta_max
expr an expression in theta
Named Arguments:
theta_min (default: 0)
theta_max (default: 2pi)
Plots (x, y) = expressions from t_min to t_max
expressions a list of two expression, the first for x(t), the second for y(t): for example, [cos(t), sin(t)]
Named Arguments:
Plots contour lines of the function f(x, y) = expr
expr an expression in x and y
Named Arguments:
See Shared named arguments. Note that some arguments are pluralized for this function: colors, widths, styles, and alphas.
Draws a 2D scatter plot
points a list of coordinate pairs: for example, [[0, 0], [1, 2], [5, -1]]
x_min lower bound for x-axis
x_max upper bound for x-axis
y_min lower bound for y-axis
y_max upper bound for y-axis
Named arguments:
sym
color See https://docs.racket-lang.org/plot/intro.html#%28part._.Colors_and_.Styles%29
fill_color
point_size
line_width
alpha
Plots a vector field
vector_expr expression to generate vectors: for example, list<x, x + y>
x_min lower bound for x-axis
x_max upper bound for x-axis
y_min lower bound for y-axis
y_max upper bound for y-axis
Named Arguments:
samples Number of samples taken, per axis. Integer >= 2
scale If scale is a real number, arrow lengths are multiplied by scale. If "auto", the scale is calculated in a way that keeps arrows from overlapping. If "normalized", each arrow is made the same length.
color See https://docs.racket-lang.org/plot/intro.html#%28part._.Colors_and_.Styles%29
line_style
line_width
Draws a pair of rectangular axes that go through (x, y)
Named arguments
x_ticks
y_ticks
x_labels
y_labels
alpha
Draws a set of polar axes
Named Arguments:
number
ticks
labels
alpha
Draws grid lines corresponding to the axis ticks
Draws a horizontal line at y
Named Arguments:
x_min
x_max
color
width
style
alpha
label
Draws a vertical line at x
Named Arguments:
x_min
x_max
color
width
style
alpha
label
Labeling functions, with the exception of arrow_label_2d, have the following named arguments.
font_color See https://docs.racket-lang.org/plot/intro.html#%28part._.Colors_and_.Styles%29
font_family
font_size
anchor
angle
point_color See https://docs.racket-lang.org/plot/intro.html#%28part._.Colors_and_.Styles%29
point_fill_color
point_size
point_line_width
sym
alpha
Labels a point
point coordinates of the point to label
label a string with which to label the point. Defaults to the point's coordinates
Named Arguments:
See Shared named arguments.
Labels the point (x, f(x))
f an expression in x
x the value at which to label the function
label a string with which to label the point. Defaults to the point's coordinates
Named arguments:
See Shared named arguments.
Labels the point (f(y), y)
f an expression in y
y the value at which to label the function
label a string with which to label the point. Defaults to the point's coordinates
Named Arguments:
See Shared named arguments.
Labels the point (r(theta), theta)
r an expression in theta
theta the value at which to label the function
label a string with which to label the point. Defaults to the point's coordinates (in rectangular coordinates)
Named Arguments:
See Shared named arguments.
Labels the point f(t)
f a list of two expressions: [x(t), y(t)]
t the value at which to label the function
label a string with which to label the point. Defaults to the point's coordinates
Named Arguments:
See Shared named arguments.
Draws an arrow from point1 to point2
point1 the tail of the arrow
point2 the head of the arrow
label a string with which to label the arrow
Named Arguments:
font_color See https://docs.racket-lang.org/plot/intro.html#%28part._.Colors_and_.Styles%29
font_size
anchor
angle
label_padding
arrow_color See https://docs.racket-lang.org/plot/intro.html#%28part._.Colors_and_.Styles%29
arrow_size
line_width
height_ratio
alpha
Interval plotting functions have the following named arguments.
x_min
x_max
y_min
y_max
samples
color
style
line1_color
line1_width
line1_style
line2_color
line2_width
line2_style
alpha
label
Plots y = f1 and y = f2 and shades the area between them
Named Arguments:
Plots x = f1 and x = f2 and shade the area between them
Named Arguments:
Plots line charts based on points1 and point2 and shades the area between them
Named Arguments:
See Shared named arguments. Note that this function omits the argument samples.
Plots r = f1 and r = f2 from theta_min to theta_max and shades the area between them
Named Arguments:
theta_min
theta_max
Plots f1 and f2 from t_min to t_max and shades the area between them
Named Arguments:
Plots contour lines of the function f(x, y) = expr and shades the areas between them
expr an expression in x and y
Named Arguments:
levels
See Shared named arguments. Note that some arguments are pluralized for this function: colors, styles, and alphas, and that it uses contour_colors, contour_widths, and contour_styles in place of line1_color, line2_color, line1_width, etc.