help-octave
[Top][All Lists]
Advanced

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

Re: Problems adapting Visual Style of Octave Graph


From: Michael Goffioul
Subject: Re: Problems adapting Visual Style of Octave Graph
Date: Mon, 3 Jun 2013 14:59:22 -0400

On Sat, Jun 1, 2013 at 11:08 PM, Alaak <address@hidden> wrote:
Hi,

The command set(gca(), 'box', 'off') unfortunately also removes the two borderlines. I'd rather would only remove the thicks. However it was possible to fix this by plotting a straight line add the border using the 'xlim' and 'ylim' properties.

With the fltk toolkit setting the grid line style works now. Thanks for that. Although a small problem remains. The FLTK toolkit seems to have shrunk the spacing between the y label and the y axis and now the y label overlaps with the numbers on the y axis. I was able to fix this using:
        get(get(gca(),'ylabel'))
to get the current coordinates of the label at the position property and then set new coordinates using something like:
       set(get(gca(), 'ylabel'), 'position', [-650.05991 0.50000 0.00000])

The 'xcolor', 'ycolor' and 'zcolor' properties do unfortunately not set the color of the axis itself but only of the labels and thicks if I use it like: set(gca(), 'xcolor', [1 0 0]); So is there anything I might miss here?

I've tried on the current branch and it behaves as expected with FLTK. BUT, in your case, because your using solid line for tick lines, I think you're not seeing it because of overlapping lines. For instance, the X axis lines is the same as the first Y tick line, and this first Y tick line is also rendered. If both X and Y axis have the same color, it doesn't matter. When they have different colors, then the first Y tick line interfere with the X axis, especially when the tick lines are solid. In the OpenGL renderer, the X axis is rendered first with the right color, but later on the Y tick line is rendered and override the X axis.

If you turn back your gridlinestyle to ':', you should see what I mean.

This can probably be considered as a bug. To fix it, one would have to compare the first (visible) Y tick line with the X axis position and not render the tick line if they match. Though comparing double values is prone to unexpected results.

Maybe a better approach is to render the tick lines first (X/Y/Z) and only then render the external box.

Michael.


reply via email to

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