|
View:
New views
17 Messages
—
Rating Filter:
Alert me
|
|
|
x11: slow drawing after set xtics fontGnuplot x11 drawings in Octave 3.2 appear displayed much slower than it is
usual. This slow-down can be reproduced in gnuplot by e.g.: set terminal x11 close test set terminal x11 close set title "Hello world" font "*,12" # no effect to speed set xtics font "*,12" # makes slow drawing plot sin(x)/x This slow-down is caused by set xtics font "*,12" while the font specification in "set title" does not slow gnuplot down. Note that using "set terminal wxt" does change its speed after the font command. What can be the reason? Could the speed be improved? The delay of replotting is rather boring when working with Octave on a laptop running on battery :-( --- PM ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics font'*' as a font name is a disadvantageous choice: the font selection
mechanism of the x-server searches through all the fonts to find one which matches the name (there is a speed difference between specifying '*' and the name of a non existent font) and has the selected font size - in the normal x-server installation first the bitmapped fonts are searched then the scalable. you can see this by specifying different font sizes: different fonts (sometimes even none) are selected. to make the plot fast select the name of a font which exists.
|
|
|
Re: x11: slow drawing after set xtics font> '*' as a font name is a disadvantageous choice: the font selection
> mechanism of the x-server searches through all the fonts to find > one which matches the name (there is a speed difference between > specifying '*' and the name of a non existent font) and has the > selected font size - in the normal x-server installation first the > bitmapped fonts are searched then the scalable. If the drawing gets so slow, it seems that the server searches the font list for each tic for font "*", right? Cannot this be eliminated? I think that Octave should produce gnuplot code like: set terminal x11 font "arial" set title "Hello world" font ",12" instead of set terminal x11 set title "Hello world" font "*,12" > you can see this by specifying different font sizes: different > fonts (sometimes even none) are selected. > > to make the plot fast select the name of a font which exists. > > > Petr Mikulik wrote: > > > > Gnuplot x11 drawings in Octave 3.2 appear displayed much slower than it is > > usual. This slow-down can be reproduced in gnuplot by e.g.: > > > > > > set terminal x11 close > > test > > > > set terminal x11 close > > set title "Hello world" font "*,12" # no effect to speed > > set xtics font "*,12" # makes slow drawing > > > > plot sin(x)/x > > > > > > This slow-down is caused by > > set xtics font "*,12" > > while the font specification in "set title" does not slow gnuplot down. > > > > Note that using "set terminal wxt" does change its speed after the font > > command. > > > > What can be the reason? Could the speed be improved? > > The delay of replotting is rather boring when working with Octave on a > > laptop running on battery :-( > > > > --- > > PM ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
|
|
|
Re: x11: slow drawing after set xtics fontit would be best to specify the font once:
set terminal x11 font "arial,12" and then give a font for title and labels only if it must be different from "arial,12" if a font isn't found by the x-server then another font is taken instead without error message. specifying a font and/or size for tics makes the plotting extremely slow and is needless, because the tics should be written in the default (the one given when setting the terminal) font and size.
|
|
|
Re: x11: slow drawing after set xtics fontPetr Mikulik wrote:
>>'*' as a font name is a disadvantageous choice: the font selection >>mechanism of the x-server searches through all the fonts to find >>one which matches the name (there is a speed difference between >>specifying '*' and the name of a non existent font) and has the >>selected font size - in the normal x-server installation first the >>bitmapped fonts are searched then the scalable. > > > If the drawing gets so slow, it seems that the server searches the font list > for each tic for font "*", right? Cannot this be eliminated? > > I think that Octave should produce gnuplot code like: > > set terminal x11 font "arial" > set title "Hello world" font ",12" > > instead of > > set terminal x11 > set title "Hello world" font "*,12" I suggest gnuplot be modified slightly to deal with this. Rather than continually searching for the font when '*' is the font name, x11 terminal should search for the font the first time, record the default font file name to memory, and from there forward use the saved file name, not searching. The drawback is that the x11 terminal default font would be changeable on the fly, but that isn't an uncommon expectation with these sorts of things. Dan ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics fontOn Thursday 18 June 2009 06:55:45 Daniel J Sebald wrote:
> Petr Mikulik wrote: > >>'*' as a font name is a disadvantageous choice: the font selection > >>mechanism of the x-server searches through all the fonts to find > >>one which matches the name (there is a speed difference between > >>specifying '*' and the name of a non existent font) and has the > >>selected font size - in the normal x-server installation first the > >>bitmapped fonts are searched then the scalable. > > > > > > If the drawing gets so slow, it seems that the server searches the font list > > for each tic for font "*", right? Cannot this be eliminated? > > > > I think that Octave should produce gnuplot code like: > > > > set terminal x11 font "arial" > > set title "Hello world" font ",12" > > > > instead of > > > > set terminal x11 > > set title "Hello world" font "*,12" > > I suggest gnuplot be modified slightly to deal with this. > Rather than continually searching for the font when '*' is the font name, It's not gnuplot that's doing the search, it's the x11 font server. > x11 terminal should search for the font the first time, > record the default font file name to memory, > and from there forward use the saved file name, not searching. There is no file name. The font is provided by the x11 font server. But I am puzzled why Octave would ever want to pass "*" as a font name. It is true that x11 will eventually resolve this to something, but I don't think many/any other terminal type will handle it usefully. Ben Abbott wrote> > The problem the octave developers have is that identifying a font > that reliably works for x11, aqua and windows ... > and hopefully works for the other terminals as well. I am afraid that is impossible. Neither Octave nor gnuplot has any control over what fonts are available on a user's system, and different terminal types intrinsically use different types of fonts. The right thing to pass is either no font option at all (which on all terminals should yield a usable default), or ",12" which will yield that same default font in a particular size. Ethan ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics font> > > If the drawing gets so slow, it seems that the server searches the font list
> > > for each tic for font "*", right? Cannot this be eliminated? > > > > > > I think that Octave should produce gnuplot code like: > > > > > > set terminal x11 font "arial" > > > set title "Hello world" font ",12" > > > > > > instead of > > > > > > set terminal x11 > > > set title "Hello world" font "*,12" > > But I am puzzled why Octave would ever want to pass "*" as a font name. What I can see on my Linux is that gnuplot> set title "Hello world" font ",20"; p x gnuplot> set title "Hello world" font "*,20"; p x show the same drawing, while in gnuplot> set title "Hello world" font ",22"; p x gnuplot> set title "Hello world" font "*,22"; p x the case ",22" shows an ugly text. > > The problem the octave developers have is that identifying a font > > that reliably works for x11, aqua and windows ... > > and hopefully works for the other terminals as well. > > I am afraid that is impossible. Neither Octave nor gnuplot has any > control over what fonts are available on a user's system, and different > terminal types intrinsically use different types of fonts. Cannot it get the list via xlsfont, GDFONTPATH, etc. and then use arial/verdana/helvetica/ (i.e. the usual ttf and postscript fonts)? > The right thing to pass is either no font option at all (which on all > terminals should yield a usable default), or ",12" which will > yield that same default font in a particular size. --- PM ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics fontOn Jun 19, 2009, at 2:50 AM, Petr Mikulik wrote: >>>> If the drawing gets so slow, it seems that the server searches >>>> the font list >>>> for each tic for font "*", right? Cannot this be eliminated? >>>> >>>> I think that Octave should produce gnuplot code like: >>>> >>>> set terminal x11 font "arial" >>>> set title "Hello world" font ",12" >>>> >>>> instead of >>>> >>>> set terminal x11 >>>> set title "Hello world" font "*,12" >> >> But I am puzzled why Octave would ever want to pass "*" as a font >> name. > > What I can see on my Linux is that > gnuplot> set title "Hello world" font ",20"; p x > gnuplot> set title "Hello world" font "*,20"; p x > > show the same drawing, while in > > gnuplot> set title "Hello world" font ",22"; p x > gnuplot> set title "Hello world" font "*,22"; p x > the case ",22" shows an ugly text. > > >>> The problem the octave developers have is that identifying a font >>> that reliably works for x11, aqua and windows ... >>> and hopefully works for the other terminals as well. >> >> I am afraid that is impossible. Neither Octave nor gnuplot has any >> control over what fonts are available on a user's system, and >> different >> terminal types intrinsically use different types of fonts. > > Cannot it get the list via xlsfont, GDFONTPATH, etc. and then use > arial/verdana/helvetica/ (i.e. the usual ttf and postscript fonts)? > I like that idea (provided xlsfonts always accompanies x11). If we wanted to match a scalable font whose metrics are as close to Helvetica as possible, how would that be done with xlsfonts? Ben ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics font> > Cannot it get the list via xlsfont, GDFONTPATH, etc. and then use > > arial/verdana/helvetica/ (i.e. the usual ttf and postscript fonts)? > > > > I like that idea (provided xlsfonts always accompanies x11). It does not. In particular it does seem to be provided by default in xorg distributions. > If we wanted to match a scalable font whose metrics are as close to > Helvetica as possible, how would that be done with xlsfonts? I think you are attacking this from the wrong end. If Octave wants to use a "standard" font but are worried that the user's font server may not provide it, you should include a FAQ or trouble-shooting guide explaining how to add that font to the font server. Ethan ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics fontOn Friday 19 June 2009, Ethan Merritt wrote:
> > > Cannot it get the list via xlsfont, GDFONTPATH, etc. and then use > > > arial/verdana/helvetica/ (i.e. the usual ttf and postscript fonts)? > > > > > > > I like that idea (provided xlsfonts always accompanies x11). > > It does not. In particular it does seem to be provided by default in xorg not ^^^ > distributions. ------------------------------------------------------------------------------ Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics fontOn Friday, June 19, 2009, at 12:47PM, "Ethan Merritt" <merritt@...> wrote: > >> > Cannot it get the list via xlsfont, GDFONTPATH, etc. and then use >> > arial/verdana/helvetica/ (i.e. the usual ttf and postscript fonts)? >> > >> >> I like that idea (provided xlsfonts always accompanies x11). > >It does not. In particular it does seem to be provided by default in xorg >distributions. > >> If we wanted to match a scalable font whose metrics are as close to >> Helvetica as possible, how would that be done with xlsfonts? > >I think you are attacking this from the wrong end. >If Octave wants to use a "standard" font but are worried that the user's font >server may not provide it, you should include a FAQ or trouble-shooting guide >explaining how to add that font to the font server. > > Ethan That is a reasonable thing to include in the manual, but we'd also like to ensure that the graphics work with the user tries his/her first plot command. ------------------------------------------------------------------------------ Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics fontOn Fri, 19 Jun 2009, Ben Abbott wrote:
> > On Friday, June 19, 2009, at 12:47PM, "Ethan Merritt" <merritt@...> wrote: > > > >> > Cannot it get the list via xlsfont, GDFONTPATH, etc. and then use > >> > arial/verdana/helvetica/ (i.e. the usual ttf and postscript fonts)? > >> > > >> > >> I like that idea (provided xlsfonts always accompanies x11). > > > >It does not. In particular it does seem to be provided by default in xorg > >distributions. > > > >> If we wanted to match a scalable font whose metrics are as close to > >> Helvetica as possible, how would that be done with xlsfonts? > > > >I think you are attacking this from the wrong end. > >If Octave wants to use a "standard" font but are worried that the user's font > >server may not provide it, you should include a FAQ or trouble-shooting guide > >explaining how to add that font to the font server. > > > > Ethan > > That is a reasonable thing to include in the manual, but we'd > also like to ensure that the graphics work with the user tries > his/her first plot command. As author of another program that calls gnuplot to generate graphics, I see your point and agree. The approach taken by gretl ( http://gretl.sourceforge.net ) is to include in the package, as a failsafe, a "known good" free font (e.g. FreeSans.ttf) and to make this the default for gnuplot rendition. This may require some manipulation of environment variables. Allin Cottrell ------------------------------------------------------------------------------ Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics fontOn Friday 19 June 2009, Allin Cottrell wrote:
> On Fri, 19 Jun 2009, Ben Abbott wrote: > > > > > On Friday, June 19, 2009, at 12:47PM, "Ethan Merritt" <merritt@...> wrote: > > > > > >> > Cannot it get the list via xlsfont, GDFONTPATH, etc. and then use > > >> > arial/verdana/helvetica/ (i.e. the usual ttf and postscript fonts)? > > >> > > > >> > > >> I like that idea (provided xlsfonts always accompanies x11). > > > > > >It does not. In particular it does seem to be provided by default in xorg > > >distributions. > > > > > >> If we wanted to match a scalable font whose metrics are as close to > > >> Helvetica as possible, how would that be done with xlsfonts? > > > > > >I think you are attacking this from the wrong end. > > >If Octave wants to use a "standard" font but are worried that the user's font > > >server may not provide it, you should include a FAQ or trouble-shooting guide > > >explaining how to add that font to the font server. > > > > > > Ethan > > > > That is a reasonable thing to include in the manual, but we'd > > also like to ensure that the graphics work with the user tries > > his/her first plot command. > > As author of another program that calls gnuplot to generate > graphics, I see your point and agree. > > The approach taken by gretl ( http://gretl.sourceforge.net ) is to > include in the package, as a failsafe, a "known good" free font > (e.g. FreeSans.ttf) and to make this the default for gnuplot > rendition. This may require some manipulation of environment > variables. Yeah, that's fine for gd/png/pdf but it won't work for x11. In order to use an x11 font you have to teach the font server where to find it, or what it can substitute, which is exactly what I was suggesting as the right approach. X11 programs request fonts by passing a name template in a request to the font server. Knowing a filename doesn't actually help much, because the lookup process is not based on files or file names. ------------------------------------------------------------------------------ Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics fontOn Jun 19, 2009, at 10:56 PM, Ethan Merritt wrote:
> On Friday 19 June 2009, Allin Cottrell wrote: >> On Fri, 19 Jun 2009, Ben Abbott wrote: >> >>> On Friday, June 19, 2009, at 12:47PM, "Ethan Merritt" <merritt@... >>> > wrote: >>>> >>>>>> Cannot it get the list via xlsfont, GDFONTPATH, etc. and then use >>>>>> arial/verdana/helvetica/ (i.e. the usual ttf and postscript >>>>>> fonts)? >>>>>> >>>>> >>>>> I like that idea (provided xlsfonts always accompanies x11). >>>> >>>> It does not. In particular it does seem to be provided by >>>> default in xorg >>>> distributions. >>>> >>>>> If we wanted to match a scalable font whose metrics are as close >>>>> to >>>>> Helvetica as possible, how would that be done with xlsfonts? >>>> >>>> I think you are attacking this from the wrong end. >>>> If Octave wants to use a "standard" font but are worried that the >>>> user's font >>>> server may not provide it, you should include a FAQ or trouble- >>>> shooting guide >>>> explaining how to add that font to the font server. >>>> >>>> Ethan >>> >>> That is a reasonable thing to include in the manual, but we'd >>> also like to ensure that the graphics work with the user tries >>> his/her first plot command. >> >> As author of another program that calls gnuplot to generate >> graphics, I see your point and agree. >> >> The approach taken by gretl ( http://gretl.sourceforge.net ) is to >> include in the package, as a failsafe, a "known good" free font >> (e.g. FreeSans.ttf) and to make this the default for gnuplot >> rendition. This may require some manipulation of environment >> variables. > > Yeah, that's fine for gd/png/pdf but it won't work for x11. > In order to use an x11 font you have to teach the font server where > to find it, > or what it can substitute, which is exactly what I was suggesting as > the right > approach. X11 programs request fonts by passing a name template in a > request to the font server. Knowing a filename doesn't actually > help much, > because the lookup process is not based on files or file names. Ethan, if I were to add freesans.ttf to my system and "teach the font server where to find it", would the font then be available to be used by gnuplot's x11 terminal? Ben ------------------------------------------------------------------------------ _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics fontOn Wednesday 24 June 2009, Ben Abbott wrote:
> Ethan, if I were to add freesans.ttf to my system and "teach the font > server where to find it", would the font then be available to be used > by gnuplot's x11 terminal? Yes. ------------------------------------------------------------------------------ _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: x11: slow drawing after set xtics fontHi,
Does anyone know of a fix or patch (perhaps directly applicable to the executable) for this problem short of modifying the source and recompiling Octave from scratch? I just ran into the problem on a new Debian Testing ("Squeeze") install which uses Octave 3.2. As you say, Gnuplot works fine on its own, but is so slow with Octave as to be virtually unusable. Earlier versions (2.XX) were amazingly fast on Debian Lenny, Etch, and Sarge. No wonder I hate upgrading: something always breaks. I can see the point of wanting to use something that would work even if a particular font was not installed, but at least if that route is taken, give the user a place in a config file where a font can be manually set so that the search (and consequent long delay) can be avoided. Jeff the astro-quant
|
| Free embeddable forum powered by Nabble | Forum Help |