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
2 changes: 2 additions & 0 deletions doc/en/CAS/Maxima_plot.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ The following CASText gives representative examples of the plot2d features suppo
{@plot(x^3,[x,-3,3], [alt,"What is this function?"])@}
<h3>Multiple graphs, clips the \(y\) values</h3>
{@plot([x^3,exp(x)],[x,-2,2],[y,-4,4])@}
<h3>Implicit plot</h3>
{@plot(2^2*x*y*(x^2-y^2)-x^2-y^2=0, [x,-4,4], [y,-4,4])@}
<h3>With and without a grid</h3>
{@plot([x^2/(1+x^2),2*x/(1+x^2)^2], [x, -2, 2], [y,-2.1,2.1], grid2d)@}
{@plot([x^2/(1+x^2),2*x/(1+x^2)^2], [x, -2, 2], [y,-2.1,2.1])@}
Expand Down
3 changes: 2 additions & 1 deletion doc/en/Developer/Development_track.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ We use the [github issue tracker](https://github.com/maths/moodle-qtype_stack/is

This incremental release contains some minor, but useful, bug fixes.

Add in support for JSXGraph 1.12.2.
* Add in support for JSXGraph 1.12.2.
* Add in support for implicit plots via Maxima's `plot2d` command, wrapped in STACK as `plot`.

This release contains the [HELM materials](../STACK_question_admin/Library/HELM.md) as part of the STACK question library. HELM question banks are managed using [Gitsync](https://github.com/maths/moodle-qbank_gitsync).

Expand Down
1 change: 0 additions & 1 deletion doc/en/Specialist_tools/Graphics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ There are a number of ways to embed plots, images, diagrams etc into STACK.
Notes.

* The `draw` package is currently not supported.
* Maxima's `implicit_plot()` function does not respect the plot options, and we cannot place the resulting plot files in the correct places. Hence, STACK does not currently support implicit plots. For reference try `load("implicit_plot");implicit_plot(x^2+y^2=x^2*y^2+1,[x,-2,2],[y,-2,2]);` in Maxima.
* As of version 4.0, the tags `{#...#}` provide the possibility to interact with 3rd party scripts. If you have examples of this, please contact the developers.
4 changes: 2 additions & 2 deletions lang/en/qtype_stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,8 @@
$string['healthchecksampleinlinetex'] = '\(\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}\).';
$string['healthcheckmaximalocal'] = 'Contents of the maximalocal file';
$string['healthcheckplots'] = 'Graph plotting';
$string['healthcheckplotsintro'] = 'There should be two different plots. If two identical plots are seen then this is an error in naming the plot files. If no errors are returned, but a plot is not displayed then one of the following may help. (i) check read permissions on the two temporary directories. (ii) change the options used by GNUPlot to create the plot. Currently there is no web interface to these options.';
$string['healthchecksampleplots'] = 'Two example plots below. {@plot([x^4/(1+x^4),diff(x^4/(1+x^4),x)],[x,-3,3])@} {@plot([sin(x),x,x^2,x^3],[x,-3,3],[y,-3,3],grid2d)@} A third, smaller, plot should be displayed below with traditional axes. {@plot([x,2*x^2-1,x*(4*x^2-3),8*x^4-8*x^2+1,x*(16*x^4-20*x^2+5),(2*x^2-1)*(16*x^4-16*x^2+1)],[x,-1,1],[y,-1.2,1.2],[box, false],[yx_ratio, 1],[axes, solid],[xtics, -3, 1, 3],[ytics, -3, 1, 3],[size,250,250])@}';
$string['healthcheckplotsintro'] = 'Sample plots.';
$string['healthchecksampleplots'] = 'Two example plots below. {@plot([x^4/(1+x^4),diff(x^4/(1+x^4),x)],[x,-3,3])@} {@plot([sin(x),x,x^2,x^3],[x,-3,3],[y,-3,3],grid2d)@} A third, smaller, plot should be displayed below with traditional axes. {@plot([x,2*x^2-1,x*(4*x^2-3),8*x^4-8*x^2+1,x*(16*x^4-20*x^2+5),(2*x^2-1)*(16*x^4-16*x^2+1)],[x,-1,1],[y,-1.2,1.2],[box, false],[yx_ratio, 1],[axes, solid],[xtics, -3, 1, 3],[ytics, -3, 1, 3],[size,250,250])@} Fourth is an implicit plot {@plot(2^2*x*y*(x^2-y^2)-x^2-y^2=0, [x,-4,4], [y,-4,4])@}';
$string['healthcheckjsxgraph'] = 'JSXGraph binding and MathJax';
$string['healthcheckjsxgraphintro'] = 'There should be a graph and an input below. Interacting with the graph should affect the input and vice versa. If not, then there are issues with JavaScript libraries or execution. The graph should also have a MathJax-rendered LaTeX formula visible. If not, then you might be blocking access to certain things and may need to tune firewalls, proxys, etc.; if you are running a closed install, try adjusting the remote addresses in <code>vle_specific.php</code>. The graph (if functioning) is based on <a href="https://jsxgraph.org/share/example/differential-equations">this example</a>.';
$string['healthcheckjsxgraphsample'] = '<div class="formulation" style="width:36vw;margin:auto;">
Expand Down
4 changes: 2 additions & 2 deletions stack/maxima/stackmaxima.mac
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,8 @@ plot(ex, [ra]) := /*stack_web_plot*/
ex:ev(ex, lg=logbasesimp),
lvs: listofvars(%_ce_rem(ex)),
lvs: sublist(lvs, lambda([ex], not(ex = discrete or ex = parametric or ex = minus or ex = plus))),
if length(lvs)>1 then
error("Plot error: Can't create a plot with more than one variable, whereas you have: \\(",string(lvs),"\\)"),
if length(lvs)>2 then
error("Plot error: Can't create a plot with more than two variables, whereas you have: \\(",string(lvs),"\\)"),
/*********************/
/* Sort out alt-text */
kill(alt),
Expand Down
Loading