The plot will have quantity on the y-axis. The x-axis data is passed in as a separate vector, so it can be any of the input values used in the model (or even in principle a variable that is only indirectly related to the input values).

make.demand.plot(alldata, xdata, xlabel, max.yval = NULL)

Arguments

alldata

Data frame of output returned from food.dmnd.

xdata

Vector of values for the x-axis.

xlabel

Character string to use for the x-axis label

max.yval

Maximum value to display on the y-axis. See details.

Value

Plot of food demand by staples and non-staples relative to income