You are viewing this question as it will appear in the manual grading interface. Return to the normal view when you are done.

Element pl-figure: Display a statically or dynamically generated image

The examples below showcase different features of pl-figure. The goal of this element is to display statically and dynamically generated images.

Part 1

Here is an example of of a static figure. By default, pl-figure will read static files from the clientFilesQuestion directory or from clientFilesCourse directory if overridden using the directory attribute. Depending on the display size of the window, the size of the displayed figure will automatically adjust to fit within the window.

Graph of a sine wave
Part 2

Here is an example of a fixed width figure. The width of the displayed figure can be set using the width attribute; the size of the figure will automatically shrink if the the specified width is too big for the display window.

Graph of a sine wave
Part 3

Here is an example of a dynamic figure. The contents of a dynamic image can be generated using the file() function inside server.py when the attribute type="dynamic" is set in the element tag.

Graph of 1*cos(x) function
Part 4

Here is an example of inline figures.


Select Slider set to true instead of Slider set to false from below.


Use display="inline" to embed a figure inline with the rest of the elements, like texts.

Correct answer

Part 1
Part 2
Part 3
Part 4
  • (a) Select this: Slider set to true

Use display="inline" to embed a figure inline with the rest of the elements, like texts.

Student view placeholder

In student views this area is used for assessment and score info.
Tools

Staff information

Question

Title:
Element pl-figure: Display a statically or dynamically generated image

Variant

Started at:
2026-08-04 22:49:11 (CDT)
Duration:
0s
Show/Hide answer
{
  "booleans": {
    "key": "a",
    "html": "Select this: <pl-figure file-name=\"true.png\" display=\"inline\" alt=\"Slider set to true\"></pl-figure>",
    "score": 1,
    "feedback": null
  }
}
History
dec frac
rad deg