How do I plot many lines on one plot of a graphsheet without running out
of time or memory?
I have a dataframe that contains maybe 10,000 rows. One of the columns
is an 'id' which changes within the dataframe so that there may be
1 - 50 rows with a given id and then another group of 1 to 50 rows with
a different id.
Other columns in the dataframe are x and y with one pair per row (sorted
by increasing x if it matters)
For each id I want to draw a line that all has the points for id.
Using guiCreate naming the dataframe, x, y, and z columns I get a basic
line plot but one long connected line.
I need to break this into separate line.
Using the 'break when x decreases' isn't accurate because sometimes the
highest x for one id is still lower than the lowest of a different id.
Creating a new line plot (on the same plot) for each line results in the
correct lines but apparently uses up too much memory. My PC crashes
sometimes and very often stops drawing or otherwise slows unacceptably.
I've tried inserting a row of missing values using insert.row() and then
having the line 'break on missing'. This creates the correct lines and
the memory usage seems ok, but the inserting of lines seems to take a
long time. plots that used to take 1 or 2 seconds are now taking 30
seconds or more. If there's a more efficient way of adding lines to the
middle of a dataframe that might help.
I'm using SPlus 7.0 on a Windows PC.
The graphs need to be interactive so plots in the basic splus devices
won't be accepatble.
Any other techniques around for accomplishing this and creating the
plots I need.
|