From 9e7b64740df59ebe29fb473fa0ecb86c9d646d6a Mon Sep 17 00:00:00 2001 From: skylarmt Date: Thu, 15 Jan 2015 02:42:41 -0700 Subject: [PATCH] Graphing changes --- src/net/apocalypselabs/symat/Functions.java | 2 +- src/net/apocalypselabs/symat/Graph.java | 4 ++-- src/net/apocalypselabs/symat/resources/jsfunctions.txt | 2 +- src/net/apocalypselabs/symat/resources/pyfunctions.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/net/apocalypselabs/symat/Functions.java b/src/net/apocalypselabs/symat/Functions.java index 383144e..7d827c8 100644 --- a/src/net/apocalypselabs/symat/Functions.java +++ b/src/net/apocalypselabs/symat/Functions.java @@ -123,7 +123,7 @@ public class Functions { /* Graphing interfaces */ - public void plotrange(double xmin, double xmax) { + public void xlim(double xmin, double xmax) { graphwin.setRange(xmin, xmax); } diff --git a/src/net/apocalypselabs/symat/Graph.java b/src/net/apocalypselabs/symat/Graph.java index f65ba3a..2ae56bd 100644 --- a/src/net/apocalypselabs/symat/Graph.java +++ b/src/net/apocalypselabs/symat/Graph.java @@ -267,7 +267,7 @@ public class Graph extends javax.swing.JInternalFrame { String xx = ""; String yy = ""; double x; - for (x = xmin; x <= xmax; x += ((xmax - xmin) / 60.0)) { + for (x = xmin; x <= xmax; x += ((xmax - xmin) / 400.0)) { String res; try { cr.setVar("x", x); @@ -368,7 +368,7 @@ public class Graph extends javax.swing.JInternalFrame { double[] xpt = {x}; double[] ypt = {y}; - plot.addScatterPlot("", xpt, ypt); + plot.addScatterPlot("", Color.BLACK, xpt, ypt); } private void inBoxKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_inBoxKeyTyped diff --git a/src/net/apocalypselabs/symat/resources/jsfunctions.txt b/src/net/apocalypselabs/symat/resources/jsfunctions.txt index 7b66e20..dbe8d17 100644 --- a/src/net/apocalypselabs/symat/resources/jsfunctions.txt +++ b/src/net/apocalypselabs/symat/resources/jsfunctions.txt @@ -11,7 +11,7 @@ plot(x[],y[])|Graph the lists of points given. graph('')|Alias of plot('') plotname("")|Sets the title of the graph window. plotname()|Gets the title of the graph window. -plotrange(min,max)|Sets the x-axis min and max values. +xlim(min,max)|Sets the x-axis min and max values. Cannot be used after a formula has been graphed. plotclr()|Reset the graph. clearplot()|Alias of plotclr() drawdot(x, y)|Places a dot at the given coordinates. diff --git a/src/net/apocalypselabs/symat/resources/pyfunctions.txt b/src/net/apocalypselabs/symat/resources/pyfunctions.txt index eb969cc..60f7350 100644 --- a/src/net/apocalypselabs/symat/resources/pyfunctions.txt +++ b/src/net/apocalypselabs/symat/resources/pyfunctions.txt @@ -11,7 +11,7 @@ _.plot(x[],y[])|Graph the lists of points given. _.graph('')|Alias of plot('') _.plotname("")|Sets the title of the graph window. _.plotname()|Gets the title of the graph window. -_.plotrange(min,max)|Sets the x-axis min and max values. +_.xlim(min,max)|Sets the x-axis min and max values. Cannot be used after a formula has been graphed. _.plotclr()|Reset the graph. _.clearplot()|Alias of plotclr() _.drawdot(x, y)|Places a dot at the given coordinates.