Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions source/precalculus/exercises/outcomes/FN/FN4/generator.sage
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,14 @@ class Generator(BaseGenerator):

@provide_data
def graphics(data):
q=plot(data["f"],-2,2,ymin=-8,ymax=8,thickness=3,gridlines=[[-8..8],[-8..8]])
q.xmin(-8)
q.xmax(8)
if data["hshift"]=="left":
p=plot(data["g"],-2-data["b"],2-data["b"],thickness=3,aspect_ratio=1)
p=plot(data["g"],-2-data["b"],2-data["b"],ymin=-8,ymax=8,thickness=3,gridlines=[[-8..8],[-8..8]])
else:
p=plot(data["g"],-2+data["b"],2+data["b"],thickness=3,aspect_ratio=1)
return {"plot1": plot(data["f"],-2,2,thickness=3,aspect_ratio=1),
"plot2": plot(p)}
p.xmin(-8)
p.xmax(8)
return {"plot1": q,
"plot2": p}
2 changes: 1 addition & 1 deletion source/precalculus/exercises/outcomes/FN/FN4/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<p>
To produce <m>{{gname}}(x)</m>, the graph of <m>{{fname}}(x)</m>is shifted {{hshift}} by <m>{{b}}</m>,
<!--{{#flip}}-->
flipped vertically,
reflected across the <m>x</m>-axis,
<!--{{/flip}}-->
and then shifted {{vshift}} by <m>{{c}}</m>.
</p>
Expand Down