title is slow for a big data set

View: New views
3 Messages — Rating Filter:   Alert me  

title is slow for a big data set

by Shaun Jackman-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When plotting a big data set, the title and label commands take as long as the
original plot to run:

plot(bigdata)
title t % takes a long time
xlabel x % and me
ylabel y % and me

Is there a way to disable rendering the plot until after I'm done -- which
could be useful for other situations too:
render off
plot(bigdata)
title t
xlabel x
ylabel y
render now

If I move the title and label commands before the plot, the plot clears the
labels I just finished setting:
title t
xlabel x
ylabel y
plot(bigdata) % erases the labels

I can use `hold' as a work around:
title t
xlabel x
ylabel y
hold on
plot(bigdata)
hold off

Any other suggestions?

Cheers,
Shaun
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: title is slow for a big data set

by Shaun Jackman-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Shaun Jackman wrote:
...

> I can use `hold' as a work around:
> title t
> xlabel x
> ylabel y
> hold on
> plot(bigdata)
> hold off
>
> Any other suggestions?

Except that even the `hold off' takes a long time! Why should `hold', which in
my mind should only alter some internal state, cause the plot to be replotted?

Cheers,
Shaun
Octave 3.0.1 (on Linux)
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: title is slow for a big data set

by Søren Hauberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

fre, 27 06 2008 kl. 13:31 -0700, skrev Shaun Jackman:
> Is there a way to disable rendering the plot until after I'm done

Every time the 'drawnow' command is called data is sent to gnuplot,
which is what's taking time. So what you want is to postpone calls to
'drawnow'. Now, before Octave waits for user input it calls 'drawnow'.
So, what you can do is either put your plotting commands in a script,
and then call that script from the command line. An alternative is to
enter all your plotting commands on one line, so instead of typing

  plot (bigdata)
  title (t)

you can write

  plot (bigdata) \
  title (t)

Søren

_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave