[system] / trunk / pg / macros / PGgraphmacros.pl Repository:
ViewVC logotype

Log of /trunk/pg/macros/PGgraphmacros.pl

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 5930 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 7 23:14:10 2008 UTC (11 years, 3 months ago) by dpvc
File length: 17985 byte(s)
Diff to previous 5915
Use a compiled vesion of the MathObjects formula rather than the
less-efficient eval method.  This should bring graphing speeds back in
line with the original non-MathObject version.

Revision 5915 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 18 19:25:24 2008 UTC (11 years, 4 months ago) by dpvc
File length: 17969 byte(s)
Diff to previous 5892
Fix problem with using value method on an undefined value when the
point returned by the graphed funciton is undefined.

Revision 5892 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 4 21:59:03 2008 UTC (11 years, 4 months ago) by dpvc
File length: 17916 byte(s)
Diff to previous 5573
Demote Real() results of Formula() evaluation back to Perl reals.

Revision 5573 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 29 02:33:27 2007 UTC (12 years, 2 months ago) by gage
File length: 17921 byte(s)
Diff to previous 5570
Modifications PGgraphicsmacros.pl suggested by Davide Cervone.


1. Don't load  MathObjects (since this causes conflicts if the webwork
question also uses Matrices as well as GraphObjects).
(This incompatibility is itself a bug, but not one we can solve immediately.)

2. Make sure that the variable is defined by defining the new rule in a local
context and insuring that the variable is defined.

(Unfortunately we don't have the original Formula, just the normalString created by the Formula
so we won't be able to guarantee the same context that created the original Formula.  However
we can get the current context and add the independent variable if it is missing.)

3. Evaluate using Parser::Evaluate so that the errors are trapped if the input is
not in the domain of definition of the function.

-------

A reasonable  next step would be to define plot_formula with syntax something like
plot_formula($formula, domain=>[0,10],color=>'red',weight=>2)
which could take further advantage of the MathObjects paradigm, but we'll probably
have to find a more robust solution to the Matrix confusion at the same time.

--Mike

Revision 5570 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 28 16:33:36 2007 UTC (12 years, 2 months ago) by gage
File length: 17371 byte(s)
Diff to previous 5569
Added explicit  loadMacros("MathObject.pl")  to
handle webwork questions which don't use math objects
for any other purpose other than graphs.

 CVS: ----------------------------------------------------------------------

Revision 5569 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Oct 27 14:13:31 2007 UTC (12 years, 2 months ago) by gage
File length: 17270 byte(s)
Diff to previous 3577
Changed plot_functions so that it uses the Formula MathObject to parse the
the function in

$f1 = qq! x^2 - 3*x + 45 for x in [0, 45) using color:red and weight:2!

instead of using the built in perl parser.

This allows things such as $formula=Formula("|x|");

$f1 = qq! $formula  for x in [0, 45) using color:red and weight:2!

to be evaluated. There should be no apparent change to old problems
since the Formula MathObject parser handles a superset of the builtin perl parser syntax.

This is not yet the most efficient method to have GraphObjects and
Formula's interact since the same string is being recompiled several times,
but it is a useful hack which preserves backward compatibility.

Revision 3577 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 26 04:19:09 2005 UTC (14 years, 4 months ago) by jj
File length: 17190 byte(s)
Diff to previous 2215
When making on-the-fly image names, replace periods in the student login
name to avoid problems with pdflatex.  Changed the replacement in set
names to use the same new trick (the old way had an infintesimal chance
of collision).  The new scheme is first double all instances of "Q".  Then
replace periods with "-Q-".

Revision 2215 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 24 21:24:41 2004 UTC (15 years, 7 months ago) by jj
File length: 17074 byte(s)
Diff to previous 2206
Allow default size of on the fly graphics to be set in global.conf, and make pop-ups of those graphs have windows closer to the size of the graph.  Also, pop-ups always make a new window - important for problems which make you compare two or more popped up graphs.

Revision 2206 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 24 17:51:44 2004 UTC (15 years, 7 months ago) by jj
File length: 16914 byte(s)
Diff to previous 1317
Made on the fly graph names use problem seed rather than psvn.  It is a better identifier for pages like SetMaker.  Also made image names workable for set names containing periods (for the day when set names are free to contain periods).

Revision 1317 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 4 05:08:37 2003 UTC (16 years, 6 months ago) by jj
File length: 16815 byte(s)
Diff to previous 1080
Fixed tick marks for graphs - x/y values were reversed.

Revision 1080 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 17:49:36 2003 UTC (16 years, 7 months ago) by apizer
File length: 16815 byte(s)
Diff to previous 1050
remove unneccsary shebang lines

Arnie

Revision 1050 - (view) (download) (as text) (annotate) - [select for diffs]
Added Fri Jun 6 21:39:42 2003 UTC (16 years, 7 months ago) by sh002i
File length: 16947 byte(s)
moved PG modules and macro files from webwork-modperl to pg
-sam

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9