help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Segmentation fault when compiling octave


From: Ben Abbott
Subject: Re: Segmentation fault when compiling octave
Date: Wed, 10 Oct 2012 15:37:13 -0400

On Oct 10, 2012, at 1:24 PM, Feuerbacher, Alan wrote:

> Ben Abbott wrote:
> 
>> Try the commands below. Do you get the same result?
>> 
>> close all
>> graphics_toolkit gnuplot
>> figure (1)
>> graphics_toolkit fltk
>> figure (2)
>> get (1:2, '__graphics_toolkit__')
>> ans =
>> {
>>  [1,1] = gnuplot
>>  [2,1] = fltk
>> }
> 
> I get the same result, and the two figures look different. Figure 1 is 
> clearly from gnuplot, and figure 2 has a format I've not seen before, so I 
> assume it's from fltk.
> 
> With your hint I tried to see if the sequence of invoking graphics_toolkit 
> makes a difference. It does.
> 
> If I start octave fresh and plot something, it uses gnuplot. If I do 
> "graphics_toolkit fltk", octave keeps using gnuplot.
> 
> If I start fresh and then do "close all" and then plot something, octave uses 
> fltk.
> 
> If I start fresh, then "close all", then "graphics_toolkit gnuplot", 
> "graphics_toolkit fltk", then octave uses fltk.
> 
> If I start fresh, then "close all", then "graphics_toolkit gnuplot", then 
> plot something, then "graphics_toolkit fltk", then octave uses gnuplot.
> 
> It seems that if you plot something after doing "graphics_toolkit gnuplot", 
> octave keeps using gnuplot even if you do "graphics_toolkit fltk" after that. 
> But if you DON'T plot something after switching toolkits, octave does the 
> right thing. Sounds like a bug, no?
> 
> Now that I know how to switch toolkits, doing "sombrero; shading interp" uses 
> the proper plotters.
> 
> Alan


All your observations are consistent with the intended implementation.

The toolkit is a property of each figure.  So it is possible for different 
figures to use different toolkits.  The commands below will register/initilaize 
both the gnuplot and fltk toolkits, create a gnuplot figure, and then switch 
its toolkit to fltk.

close all
graphics_toolkit fltk
graphics_toolkit gnuplot
figure ()
graphics_toolkit fltk
set (gcf, "__graphics_toolkit__", "fltk")

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]