Sun 25 Apr 2010 03:43:15 PM UTC, comment #20:
Ok, I see and I'm an idiot... I was miising the final axis square and expecting UR to be the same as LL.. Forget it, this works fine
D.
|
Sun 25 Apr 2010 02:01:16 PM UTC, comment #19:
hmmm ... perhaps my understanding for what the "aspect ratio" represents is in error?
After running demo ("plotyy", 2), I just did a manual measurement of the bbox for each plot box. UL: 188x143, LL: 188x143, LR: 144x144, and UR: 188x143 pixels. Since I used the mouse, I may be off by +/- 1 pixel.
So for me the UL, LL, and UR each have the same axes position width and height. and the UR is square.
Also ...
octave:3> get (gca, "position") .* get (gcf, "position")([3,4,3,4])
ans = 319.391 46.200 187.409 143.288
This looks as I expect. Do you get the same, or am I misinterpreting something?
BTW, looking at your plot the sizes are UL,LL,UR: 214x146 and LR: 164x146. Thus, the "square" plot isn't square. Any idea why?
Regarding your UR plot, this small 3D size is a feature of gnuplot-4.2.x, which I think can be fixed, but I haven't yet attempted to try.
|
Sun 25 Apr 2010 05:55:15 AM UTC, comment #18:
Your image is the same as mine essentially.. The top left plot should have the same aspect ratio as the bottom left, but doesn't
D.
|
Sat 24 Apr 2010 11:42:02 PM UTC, comment #17:
Ok, I can see your result isn't square.
I've attached what I see as well.
(file #20318)
|
Sat 24 Apr 2010 10:31:04 PM UTC, comment #16:
I used both the x11 and the wxt terminals with gnuplot 4.4.0 and 4.3.6 with the same result. I attach here a screenshot with the wxt terminal demonstrating the issue
D.
(file #20316)
|
Sat 24 Apr 2010 08:47:24 PM UTC, comment #15:
David,
For x11, I get the correct aspect ratio with both 4.2.5 and 4.4 (pre-release).
What gnuplot terminal are you using?
And is the dpi of your screen the same horizontally and vertically?
Ben
|
Sat 24 Apr 2010 06:56:01 PM UTC, comment #14:
Ok it appears to be fixed with gnuplot 4.2.6 and 4.4.0.. However the aspect ratio of the two plotyy figures in the second plotyy demo is still incorrect, but good enough.. I consider this bug closed, so I'm closing it ;-)
D.
|
Mon 19 Apr 2010 11:29:01 AM UTC, comment #13:
I noticed some code regarding the colorbox aspect ratio was present, but no longer functional after these changes. So I've removed them.
A new changeset has been uploaded.
There remain some problems with regards to the colorbar, which I'll address when fixing bug at --> https://savannah.gnu.org/bugs/?29568
(file #20283)
|
Sun 18 Apr 2010 03:21:21 AM UTC, comment #12:
Updated changeset which addresses the colorbar as well.
(file #20265)
|
Sun 18 Apr 2010 01:16:46 AM UTC, comment #11:
The changeset I just attached causes problems with the colorbar demos. Those demos didn't all work correctly before. Thus, I'm not yet sure where the colorbar problem lies.
|
Sun 18 Apr 2010 01:13:13 AM UTC, comment #10:
Upon re-examination, there is a problem in the plot stream. Octave developer sources incorrectly specifies the aspect ratio of the axes box in the gnuplot plot-stream. I've attached a changeset that fixes the problem for me. I've tested it with gnuplot 4.2.6 and using the developers sources, pre-4.4.
(file #20263)
|
Sat 17 Apr 2010 04:07:43 PM UTC, comment #9:
I've installed gnuplot 4.2.6 and see the same result as you. I looked that the plot stream, but don't see anything unusual.
What is unusual is that the three examples below give very different results.
figure(1)
clf
x = 0:0.1:2*pi;
y1 = sin (x);
y2 = cos (x);
ax = plotyy (x, y1, x, y2);
xlabel ("X");
ylabel (ax(1), "Axis 1");
ylabel (ax(2), "Axis 2");
axis (ax(2), "square")
figure(2)
clf
x = 0:0.1:2*pi;
y1 = sin (x);
y2 = exp(x - 1);
ax = plotyy (x, y1, x, y2)
xlabel ("X");
ylabel (ax(1), "Axis 1");
ylabel (ax(2), "Axis 2");
axis (ax(2), "square")
figure(3)
clf
x = 0:0.1:2*pi;
y1 = sin (x);
y2 = (x - 1);
ax = plotyy (x, y1, x, y2)
xlabel ("X");
ylabel (ax(1), "Axis 1");
ylabel (ax(2), "Axis 2");
axis (ax(2), "square")
I have some errands to run. Later I'll try to create some simple gnuplot commands to determine if the problem is with gnuplot or octave.
|
Sat 17 Apr 2010 12:54:23 PM UTC, comment #8:
The version I used is the version from debian testing.
G N U P L O T
Version 4.2 patchlevel 6
last modified Sep 2009
System: Linux 2.6.30-1-686
Installing version 4.4 and yes it works correctly with both the x11 and wxt terminals. However as gnuplot 4.4 was just released, I'd say we have to enure that older versions of gnuplot still give reasonable result.. Do you know of a work around?
D.
|
Fri 16 Apr 2010 10:50:39 PM UTC, comment #7:
David, I'm suspicious we may be running different versions of gnuplot. I'm running a version I compiled from the developers sources a few months ago. What version are you running?
Also, what do you get when you do the following? Is the mode of each axes set to "manual".
octave:10> demo ("plotyy", 1); axis square; get (findall (gcf, "type", "axes"), "plotboxaspectratiomode")
plotyy example 1:
clf
x = 0:0.1:2*pi;
y1 = sin (x);
y2 = exp (x - 1);
ax = plotyy (x, y1, x - 1, y2, @plot, @semilogy);
xlabel ("X");
ylabel (ax(1), "Axis 1");
ylabel (ax(2), "Axis 2");
ans =
{
[1,1] = manual
[2,1] = manual
}
I've attached the result I see.
Once you've reported the version of gnuplot you're using, I'll install and test that one.
Ben
(file #20247)
|
Fri 16 Apr 2010 08:46:39 PM UTC, comment #6:
I get the attached even after the patch with both the x11 and wxt terminals
D.
(file #20246)
|
Fri 16 Apr 2010 07:03:05 PM UTC, comment #5:
David, I just pulled and tested from a directory with no m-files present. This change works for me. I've verified the behavior for x11, and aqua. Using pdf the axes are the same size and position, but have the wrong width (no idea why yet).
|
Fri 16 Apr 2010 04:06:47 PM UTC, comment #4:
It doesn't seem to work for me however
D.
|
Fri 16 Apr 2010 04:02:11 PM UTC, comment #3:
I pushed it for you.
D.
|
Fri 16 Apr 2010 02:12:59 PM UTC, comment #2:
My first impression was incorrect. The problem what that the listener for the plotboxaspectratio did not catch the special case where the value is set to the default. In this case the mode is changed to manual, but since the property value does not change, no callback is initiated.
To fix it, I've added a listener to the plotboxaspecratiomode.
A changeset is attached. I'll push this change later today.
(file #20237)
|
Fri 16 Apr 2010 11:38:58 AM UTC, comment #1:
I took a quick look. A fix looks straight forward to fix. I'll start by writing a private script that determines the displayed axes position when the plotboxaspectratio indicates something different than the "position" property implies (I'm assuming such a feature isn't yet available from the native backend).
|
Thu 15 Apr 2010 10:28:28 PM UTC, original submission:
The bottom right hand figure of the second plotyy has a compressed y axis. Try
demo("plotyy", 2)
As I know you've worked on the sizing of the figures I used the "assigned to" tab on savannah to give the bug to you Ben ;-)
D.
|