help-octave
[Top][All Lists]
Advanced

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

Re: [SOLVED] change position of x-axis


From: Vlăduţ Frăţiman
Subject: Re: [SOLVED] change position of x-axis
Date: Mon, 17 Oct 2011 00:32:06 +0300

After some more test's, seems to be a problem with gnuplot when
working with xzeroaxis and set/unset borders.
With latest patch proposed here , y axis it's draw very thin and it's
different from the width of x axis.
If ai set "linewidth" parameter, seems to be affected only y axis and
x axis remain untouch (because of lw parameter introduced with patch).
Look ok if linewidth it's set to "1", but if u want a different value,
then not work.
I think that it's better to modify this patch to get possibility to
set width of x axis like for y axis.
So line: fputs (plot_stream, "set xzeroaxis lt -1 lw 1;\n");
i change to this: fprintf (plot_stream, "set xzeroaxis lt -1 lw
%f;\n", axis_obj.linewidth);

Now i can set axis width for both of them with any convenient value,
using linewidth parameter and box off.
Alse i attached the patch to see everyone what changes i make.

On Thu, Oct 13, 2011 at 3:10 AM, Ben Abbott <address@hidden> wrote:
> On Oct 12, 2011, at 8:34 AM, Ben Abbott wrote:
>
>> On Oct 12, 2011, at 7:30 AM, Vlăduţ Frăţiman wrote:
>>
>>> Still have some minor problem.
>>> I use modified version of __go_draw_axes__.m (thanks to Ben).
>>> Now, axis are positioned correctly, but horizontal axis have small
>>> points, not continuos line like that for vertical axis.
>>> My test graphics it's this (from wiki):
>>> x = linspace(0, 2*pi, 100);
>>> y = sin(x);
>>> plot(x, y, "linewidth", 2, "color", "black");
>>> set(gca,"xaxislocation","zero", "box", "off");
>>>
>>> With gnuplot I need to configure linetype of xaxis with "set xzeroaxis lt 
>>> -1".
>>> Maybe need to edit __go_draw_axes__.m file, and put corresponding command 
>>> there?
>>> I have attached graphic to show what i mean.
>>> Maybe it's my octave version to blame.
>>> <Screenshot.png>
>>
>> I'll need to do more testing before I commit this change. Buy you can try to 
>> patch your __go_draw_axes__.m.
>>
>> Please let us know if it fixes the problem, and if it produces any 
>> unintended effects.
>>
>> Ben
>
> I tested the plot demos, and found no regressions. Changeset is below.
>
>        http://hg.savannah.gnu.org/hgweb/octave/rev/add91fa2691a
>
> Vladut, Thanks for the feedback..
>
> Ben
>
>

Attachment: patch.diff
Description: Binary data


reply via email to

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