#590 ylabel rotates on Win terminal resize (4.2.2)

closed
nobody
None
5
2007-10-30
2007-10-15
No

Hi,

I'm using the 4.2.2 binary from SF.net (gp422win32.zip dated September 1, 2007) on Windows 2000.

On plotting a script file to the Windows terminal, the initial plot is as expected. But if I resize the plot window, things get screwy.

E.g.
---
reset
set term windows color enhanced "Arial Bold" 13
set size square 1.0,1.0
set xrange [-8:1]
set yrange [0:500]
set grid
set xtics -8, 2, 1
set ytics 0, 100, 500
set title "testdata.dat"
set ylabel "Drain Current (mA)"
set xlabel "Gate-Source Voltage (V)"
plot "testdata.dat" index 0 using 1:2 with linespoints lt 0 lw 2 pt 7 lc rgb "red" title "{/=10 Testdata.dat}"

---

Dragging the left or bottom margin of the plot window to resize it causes the fonts to increase in size and the ylabel to rotate horizontally. (It's the changed orientation and position of the y-axis that's the major problem.) Hitting "e" in the plot window (when the mouse is active) refreshes it correctly, except the ylabel is positioned near the top of the left y-axis and is still horizontal.

Interestingly, if one does a "reset", reloads the file and replots it, then it always acts correctly. It also works correctly with all subsequent plot files I've tried.

It seems as though there's an bug in the resizing / repainting code when the Windows terminal plot window is resized the first time.

Thanks.

Discussion

  • Petr Mikulik

    Petr Mikulik - 2007-10-15

    Logged In: YES
    user_id=31505
    Originator: NO

    I've tried it on Wine in Linux and in Windows 2000. I don't see any problem. Nobody else reported such a problem until now.

    1. Fonts don't get larger, they have the fixed size as you have set in "set term". However, your plot area gets smaller.

    2. I cannot reproduce the ylabel rotation.

    Try to reproduce the problem on any other Windows version or machine. Otherwise, it's a bug in your installation.

     
  • Petr Mikulik

    Petr Mikulik - 2007-10-15
    • status: open --> pending
     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-15
    • status: pending --> open
     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-15

    Logged In: YES
    user_id=779632
    Originator: YES

    Hi mikulik,

    Thanks for the quick reply.

    It seems to be the result of some interaction with my wgnuplot.ini file (in the default location of c:\D&S\User\AD\wgnuplot.ini). When I have "GraphFont=Arial,6", or "GraphFont=Arial,12" or "GraphFont=Arial,18" or "GraphFont=Arial,24" then I see the expected (?) resizing of the fonts on resizing the window, *and* I also see the ylabel rotate horizontally. If I use some font size that *isn't* a multiple of 6, then I don't see the ylabel rotation. The name of the font doesn't seem to matter (as long as Windows knows about it) - just the size.

    Is it still just on my machine?

    Thanks again.

     
  • Petr Mikulik

    Petr Mikulik - 2007-10-15

    Logged In: YES
    user_id=31505
    Originator: NO

    I cannot reproduce your problem.

     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-16

    Logged In: YES
    user_id=779632
    Originator: YES

    Hi,

    I've reproduced the same behavior on a different Win2k system, also running the Windows 4.2.2 binary. Deleting the wgnuplot.ini file fixes the ylabel rotation problem. But letting gnuplot create a new one (Options -> Update C:\...\wgnuplot.ini) results in the same problem (the ylabel being rotated horizontal on resizing the plot window if the GraphFont font size is a multiple of 6 (at least up to 24), etc.).

    I don't depend on wgnuplot.ini, so I'll probably just delete it on systems where it seems to be causing me problems.

    It is mysterious, but if it's not happening to others then it's not worth spending time on.

    Thanks.

    Cheers,
    Scott.

     
  • Petr Mikulik

    Petr Mikulik - 2007-10-16

    Logged In: YES
    user_id=31505
    Originator: NO

    So, I can see it also. However, it does not depend on font size, but only on font family. Truetype (vectorial) fonts can be rotated, bitmap fonts cannot. So, choose another font. It's really strange that in your installation the Arial is bitmapped ... it shouldn't be.

    In the "font selection" dialog, you can see a "TT" or "O" mark which indicates truetype font.

     
  • Petr Mikulik

    Petr Mikulik - 2007-10-16
    • status: open --> pending-works-for-me
     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-16
    • status: pending-works-for-me --> open-works-for-me
     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-16

    Logged In: YES
    user_id=779632
    Originator: YES

    That's not the behavior that I'm seeing. In my case, Arial and the other fonts I've tried are TT. It's not the font face, it's the size being a multiple of 6 points that seems to be the issue causing the ylabel rotation in my case.

    Thanks for checking. I'll report back if I have more information about this. As of right now, I vote for it being resolved (by deleting wgnuplot.ini).

     
  • Petr Mikulik

    Petr Mikulik - 2007-10-16
    • status: open-works-for-me --> pending-works-for-me
     
  • Petr Mikulik

    Petr Mikulik - 2007-10-16

    Logged In: YES
    user_id=31505
    Originator: NO

    So the problem appears differently on different machines ... your solution or changing the font solves it.

    BTW, you can try the "test" command -- it writes whether the current font supports rotation.

     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-16

    Logged In: YES
    user_id=779632
    Originator: YES

    That's not the behavior that I'm seeing. In my case, Arial and the other fonts I've tried are TT. It's not the font face, it's the size being a multiple of 6 points that seems to be the issue causing the ylabel rotation in my case.

    Thanks for checking. I'll report back if I have more information about this. As of right now, I vote for it being resolved (by deleting wgnuplot.ini).

     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-16
    • status: pending-works-for-me --> open-works-for-me
     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-16

    Logged In: YES
    user_id=779632
    Originator: YES

    Please ignore the 2007-10-16 23:17 comment. A refresh caused the earlier comment to repost. Sorry.

     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-26

    Logged In: YES
    user_id=779632
    Originator: YES

    I've found a work-around that masks the ylabel rotation bug (for me anyway) and permits the use of wgnuplot.ini:

    Instead of using ylabel, use the following:

    set label "{Drain Current (mA)}" at -10, 250 center rotate by 90

    Using that instead of ylabel for this example lets me use wgnuplot.ini, and refreshing the plot window after resizing it does not cause the label to rotate. The braces {} seem to be required even if no changes to the default font are needed (otherwise the label is always horizontal).

    The downside of this approach, of course, is that you need to position the label manually for each set of axes.

     
  • Ethan Merritt

    Ethan Merritt - 2007-10-26

    Logged In: YES
    user_id=235620
    Originator: NO

    Can we close this?

    I can't reproduce any of these strange behaviors while running the 4.2.2 binary under Wine. Therefore my inclination is to say that the strangeness is in Windows itself.

    I am curious, though. What happens if you put the curly braces around the text in the Y label command
    set ylabel "{Do I turn, or not?}"
    and does it make any different whether you have the enhanced text mode enabled?

     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517
    Originator: NO

    I agree with Ethan, so I'm putting this to "Pending". Without reproducibility, there's next to nothing we can do about this.

     
  • Hans-Bernhard Broeker

    • labels: --> 102067
    • assigned_to: nobody --> broeker
    • status: open-works-for-me --> pending-works-for-me
     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-28

    Logged In: YES
    user_id=779632
    Originator: YES

    Hi,

    I have no objection to closing this. It's curious, but I agree it's probably something to do with my machines. At the moment, my laptop and desktop are behaving differently with respect to this issue (one one machine the {} braces are necessary, on the other they aren't).... :-/

    Thanks. Sorry for the false alarm.

     
  • D. Scott Katzer

    D. Scott Katzer - 2007-10-28
    • assigned_to: broeker --> nobody
    • labels: 102067 -->
    • status: pending-works-for-me --> open-works-for-me
     
  • Ethan Merritt

    Ethan Merritt - 2007-10-30
    • status: open-works-for-me --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks