I am poking around with various ways to plot things for some of the problems I will be generating for my course in precalculus. Mostly I hope to plot various polynomials and ask questions about their roots, x and y intercepts.
The included plotting functionality makes pictures that don't seem like they will work well. It is very difficult to get the axis to be clear enough to ask questions about the roots of the polynomial.
My workaround for now will probably be to popup a window with the plotting functionality, and then tell that window to plot what I want. That seems like it will work great, but I'd rather have the <div> inline with the question.
This doesn't answer your actual question, but I'll pose it in case it's useful: I've found that by picking the image size of the plot that I generate I can get the existing PG plotting library to generate graphs that allow me to ask most questions I want. That said, it won't be as nice as a more sophisticated solution.
That being said, the way to do what you want is through the
MODES() macro, which allows you to provide different text to be used in the various viewing modes. For example,
TEXT(MODES( HTML => "This is only on screen", TeX => "This is only in hardcopy", ));will produce different output on screen from in hardcopy. So you can use something like
TEXT(MODES( HTML => '<div>...</div>', TeX => '[ You need to log into WeBWorK to see the graph for this problem ]', ));would do what you want. You can do something like
<HEAD>, but I don't remember its name).
There are more possible choices for the modes (like
HTML_dpng for image mode,
HTML_tth for formatted text mode, and so on if you need to do something specific in one of these modes, but
HTML will cover all of these.
Hope that helps out.