[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AspectRatio Patches [changeset]
From: |
Ben Abbott |
Subject: |
Re: AspectRatio Patches [changeset] |
Date: |
Wed, 03 Nov 2010 21:24:19 +0800 |
On Nov 3, 2010, at 6:19 PM, logari81 wrote:
> On Tue, 2010-11-02 at 19:13 -0400, Ben Abbott wrote:
>> On Nov 2, 2010, at 1:45 PM, logari81 wrote:
>>
>>> Hi Ben,
>>>
>>> I cannot reproduce the problems shown in your pdfs. For me with
>>> "aspectratios3.changeset" and "aspectratios4.changeset" applied the
>>> demos 1 and 5 give the results shown in the attached files.
>>>
>>> Demo 5 doesn't work with the fltk backend, but it didn't work before my
>>> changes (11159) neither. I will try to fix this problem later but
>>> actually it shouldn't be related to these patches.
>>>
>>> The only difference in 223 subplot of demo1 between matlab and my
>>> current patched version is ylim. But this is another old problem.
>>> Actually comparing 11159 with my current version with respect to demos 1
>>> and 5 there are no differences at all.
>>>
>>> Could you compare a clean build of 11159 with a clean build of 11167
>>> +aspectratios3.changeset+aspectratio4.changeset ? In case that you can
>>> confirm that the all demos behave the same, I would propose that you
>>> apply the last two patches and wait for my fixes for the rest of the
>>> issues.
>>>
>>> Best regards,
>>>
>>> Kostas
>>
>> I'm using gnuplot v 4.4.
>>
>> I suspect you're using 4.2 or earlier. The code below (85-122) is
>> responsible for the difference in behavior.
>>
>> 85 if (strcmp (axis_obj.activepositionproperty, "position"))
>> 86 if (__gnuplot_has_feature__
>> ("screen_coordinates_for_{lrtb}margin"))
>> 87 if (nd == 2 || all (mod (axis_obj.view, 90) == 0))
>> 88 x = [1, 1];
>> 89 else
>> 90 ## 3D plots need to be sized down to fit in the window.
>> 91 x = 1.0 ./ sqrt([2, 2.5]);
>> 92 endif
>> 93 fprintf (plot_stream, "set tmargin screen %.15g;\n",
>> 94 pos(2)+pos(4)/2+x(2)*pos(4)/2);
>> 95 fprintf (plot_stream, "set bmargin screen %.15g;\n",
>> 96 pos(2)+pos(4)/2-x(2)*pos(4)/2);
>> 97 fprintf (plot_stream, "set lmargin screen %.15g;\n",
>> 98 pos(1)+pos(3)/2-x(1)*pos(3)/2);
>> 99 fprintf (plot_stream, "set rmargin screen %.15g;\n",
>> 100 pos(1)+pos(3)/2+x(1)*pos(3)/2);
>> 101 sz_str = "";
>> 102 else
>> 103 fprintf (plot_stream, "set tmargin 0;\n");
>> 104 fprintf (plot_stream, "set bmargin 0;\n");
>> 105 fprintf (plot_stream, "set lmargin 0;\n");
>> 106 fprintf (plot_stream, "set rmargin 0;\n");
>> 107
>> 108 if (nd == 3 && all (axis_obj.view == [0, 90]))
>> 109 ## FIXME -- Kludge to allow colorbar to be added to a pcolor()
>> plot
>> 110 pos(3:4) = pos(3:4) * 1.4;
>> 111 pos(1:2) = pos(1:2) - pos(3:4) * 0.125;
>> 112 endif
>> 113
>> 114 fprintf (plot_stream, "set origin %.15g, %.15g;\n", pos(1),
>> pos(2));
>> 115
>> 116 if (strcmpi (axis_obj.dataaspectratiomode, "manual"))
>> 117 sz_str = sprintf ("set size ratio %.15g", -dr);
>> 118 else
>> 119 sz_str = "set size noratio";
>> 120 endif
>> 121 sz_str = sprintf ("%s %.15g, %.15g;\n", sz_str, pos(3), pos(4));
>> 122 endif
>> 123 else ## activepositionproperty == outerposition
>> 124 fprintf (plot_stream, "set origin %g, %g;\n", pos(1:2))
>> 125 sz_str = "";
>> 126 if (strcmpi (axis_obj.dataaspectratiomode, "manual"))
>> 127 sz_str = sprintf ("ratio %g", -dr);
>> 128 else
>> 129 sz_str = "noratio";
>> 130 endif
>> 131 sz_str = sprintf ("set size %s %g, %g;\n", sz_str, pos(3:4));
>> 132 endif
>>
>> Ben
>
> This was very useful information, indeed I used gnuplot 4.2. I have
> attached two updated version of my last changesets which now should work
> with gnuplot 4.4 as well.
>
> BR
>
> Kostas
> <aspectratios3a.changeset><aspectratios4a.changeset>
I've pushed both changesets.
There's been a several changes to the backend in the last few weeks. There are
now some problems with the demos ...
rundemos plot
... the ones I've noticed are for "patch" and "isosurface". Demo 2 for "hold"
also looks like there is a problem.
I mention this to enourage you to run the plot demos to make sure your
changesets don't break anything (which I don't think they have).
Thanks
Ben
- Re: AspectRatio Patches [changeset], Ben Abbott, 2010/11/01
- Re: AspectRatio Patches [changeset], logari81, 2010/11/01
- Re: AspectRatio Patches [changeset], Ben Abbott, 2010/11/01
- Re: AspectRatio Patches [changeset], Ben Abbott, 2010/11/02
- Re: AspectRatio Patches [changeset], logari81, 2010/11/02
- Re: AspectRatio Patches [changeset], Ben Abbott, 2010/11/02
- Re: AspectRatio Patches [changeset], logari81, 2010/11/03
- Re: AspectRatio Patches [changeset],
Ben Abbott <=
- Re: AspectRatio Patches [problem with colorbar], Ben Abbott, 2010/11/06
- Re: AspectRatio Patches [problem with colorbar], logari81, 2010/11/07
- Re: AspectRatio Patches [problem with colorbar], Ben Abbott, 2010/11/07