Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13121 > unrolled thread

Aligning graphics on frame boundaries

Started byBruce Shore <bwshore@me.com>
First post2013-01-13 02:51 +0000
Last post2013-01-17 04:14 +0000
Articles 6 — 5 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Aligning graphics on frame boundaries Bruce Shore <bwshore@me.com> - 2013-01-13 02:51 +0000
    Re: Aligning graphics on frame boundaries Vince Virgilio <blueschi@gmail.com> - 2013-01-14 05:01 +0000
    Re: Aligning graphics on frame boundaries James Stein <mathgroup@stein.org> - 2013-01-15 04:27 +0000
    Re: Aligning graphics on frame boundaries Vince Virgilio <blueschi@gmail.com> - 2013-01-16 06:38 +0000
    Re: Aligning graphics on frame boundaries Vincent Virgilio <vincent.virgilio@outlook.com> - 2013-01-17 04:15 +0000
    Re: Aligning graphics on frame boundaries Murray Eisenberg <murray@math.umass.edu> - 2013-01-17 04:14 +0000

#13121 — Aligning graphics on frame boundaries

FromBruce Shore <bwshore@me.com>
Date2013-01-13 02:51 +0000
SubjectAligning graphics on frame boundaries
Message-ID<kct7eu$sg6$1@smc.vnet.net>
I would like to align, within GraphicsColumn, two or more plots on their 
frame boundaries, using Mathematica 7. Back in Jan 2008 this question 
was raised by  Szabolcs Horv=E1t, so maybe it is answered, but I do not 
find  the answer in the archives, only the question.

My question is the same as his: I have two or more plots, with different 
aspect ratios or with different labels, so the images are not the same 
size. I want to align the left and right right sides of the frames in a 
GraphicsColumn. I use ImagePadding but this is very clumsy and has to be 
redone for every set of frames. Mathematica uses, for all its sizings, 
the complete outline of the figure, with labels and so on, not just the 
frame. For publications the frames have to be aligned.


---------------------------
Bruce Shore
bwshore@me.com
(925) 455 0627
--------------------------



[toc] | [next] | [standalone]


#13128

FromVince Virgilio <blueschi@gmail.com>
Date2013-01-14 05:01 +0000
Message-ID<kd03ee$6dj$1@smc.vnet.net>
In reply to#13121
On Saturday, January 12, 2013 9:51:10 PM UTC-5, Bruce Shore wrote:
> I would like to align, within GraphicsColumn, two or more plots on their 
> 
> frame boundaries, using Mathematica 7. Back in Jan 2008 this question 
> 
> was raised by  Szabolcs Horv=E1t, so maybe it is answered, but I do not 
> 
> find  the answer in the archives, only the question.
> 
> 
> 
> My question is the same as his: I have two or more plots, with different 
> 
> aspect ratios or with different labels, so the images are not the same 
> 
> size. I want to align the left and right right sides of the frames in a 
> 
> GraphicsColumn. I use ImagePadding but this is very clumsy and has to be 
> 
> redone for every set of frames. Mathematica uses, for all its sizings, 
> 
> the complete outline of the figure, with labels and so on, not just the 
> 
> frame. For publications the frames have to be aligned.
> 
[cut]

This has always been awkward to do. Though the ImagePadding approach may suffice for many cases, it works at the wrong level of abstraction.

WRI should consider a new Alignment option value of "Axes", "Frame", or "PlotRegion" in the Column and Grid family of commands.

Vince

[toc] | [prev] | [next] | [standalone]


#13148

FromJames Stein <mathgroup@stein.org>
Date2013-01-15 04:27 +0000
Message-ID<kd2lro$cn9$1@smc.vnet.net>
In reply to#13121
Vince:

I agree with your comments and suggestions.
However, the situation is worse that you suggest.
The interactions between ImageSize, FrameSize and their associated
implicit paddings is incompletely documented,
and is documented as if the documented behavior is independent of the
kind of Graphics involved, which is is not.

By coincidence, I reported this problem here on the MathGroup just a
few days ago, showing that 'Frame' acts differently upon ListPlot and
DateListPlot:

Clear[f, i3, g, d3];
d3 = {{{2012, 1, 1}, 1}, {{2012, 2, 1}, 2}, {{2012, 3, 1}, 3}};
i3 = d3[[All, 2]];
Print["d3=", d3 // MatrixForm, "  i3=", i3];
f[b_] := ListPlot[i3, Frame -> b] // Framed;
g[b_] := DateListPlot[d3, Frame -> b] // Framed;
{{f[True], f[False]}, {g[True], g[False]}}

Three of the four results are the same size; the lower right result is
smaller than the others:
It seems that applying a Frame, or not, does not change the size of a
plot produced by ListPlot, but does change the size of a plot produced
by DateListPlot.

I seek an explanation for this behavior.


On Sun, Jan 13, 2013 at 9:01 PM, Vince Virgilio <blueschi@gmail.com> wrote:
> On Saturday, January 12, 2013 9:51:10 PM UTC-5, Bruce Shore wrote:
>> I would like to align, within GraphicsColumn, two or more plots on their
>>
>> frame boundaries, using Mathematica 7. Back in Jan 2008 this question
>>
>> was raised by  Szabolcs Horv=E1t, so maybe it is answered, but I do not
>>
>> find  the answer in the archives, only the question.
>>
>>
>>
>> My question is the same as his: I have two or more plots, with different
>>
>> aspect ratios or with different labels, so the images are not the same
>>
>> size. I want to align the left and right right sides of the frames in a
>>
>> GraphicsColumn. I use ImagePadding but this is very clumsy and has to be
>>
>> redone for every set of frames. Mathematica uses, for all its sizings,
>>
>> the complete outline of the figure, with labels and so on, not just the
>>
>> frame. For publications the frames have to be aligned.
>>
> [cut]
>
> This has always been awkward to do. Though the ImagePadding approach may suffice for many cases, it works at the wrong level of abstraction.
>
> WRI should consider a new Alignment option value of "Axes", "Frame", or "PlotRegion" in the Column and Grid family of commands.
>
> Vince
>

[toc] | [prev] | [next] | [standalone]


#13157

FromVince Virgilio <blueschi@gmail.com>
Date2013-01-16 06:38 +0000
Message-ID<kd5htj$jjc$1@smc.vnet.net>
In reply to#13121
I think we need a visual guide for the various size-like options, across the commands that take them. One page of the visual guide for each kind of usage; all the better if a single page will do. If it was given enough weight at WRI, it could serve as a sanity check for new plot commands.

Vince

On Monday, January 14, 2013 11:27:36 PM UTC-5, James Stein wrote:
> Vince:
>
>
>
> I agree with your comments and suggestions.
>
> However, the situation is worse that you suggest.
>
> The interactions between ImageSize, FrameSize and their associated
>
> implicit paddings is incompletely documented,
>
> and is documented as if the documented behavior is independent of the
>
> kind of Graphics involved, which is is not.
>
>
>
> By coincidence, I reported this problem here on the MathGroup just a
>
> few days ago, showing that 'Frame' acts differently upon ListPlot and
>
> DateListPlot:
>
>
>
> Clear[f, i3, g, d3];
>
> d3 = {{{2012, 1, 1}, 1}, {{2012, 2, 1}, 2}, {{2012, 3, 1}, 3}};
>
> i3 = d3[[All, 2]];
>
> Print["d3=", d3 // MatrixForm, "  i3=", i3];
>
> f[b_] := ListPlot[i3, Frame -> b] // Framed;
>
> g[b_] := DateListPlot[d3, Frame -> b] // Framed;
>
> {{f[True], f[False]}, {g[True], g[False]}}
>
>
>
> Three of the four results are the same size; the lower right result is
>
> smaller than the others:
>
> It seems that applying a Frame, or not, does not change the size of a
>
> plot produced by ListPlot, but does change the size of a plot produced
>
> by DateListPlot.
>
>
>
> I seek an explanation for this behavior.
>
>
>
>
>
> On Sun, Jan 13, 2013 at 9:01 PM, Vince Virgilio wrote:
>
> > On Saturday, January 12, 2013 9:51:10 PM UTC-5, Bruce Shore wrote:
>
> >> I would like to align, within GraphicsColumn, two or more plots on the=
ir
>
> >>
>
> >> frame boundaries, using Mathematica 7. Back in Jan 2008 this question
>
> >>
>
> >> was raised by  Szabolcs Horv=E1t, so maybe it is answered, but I do =
not
>
> >>
>
> >> find  the answer in the archives, only the question.
>
> >>
>
> >>
>
> >>
>
> >> My question is the same as his: I have two or more plots, with differe=
nt
>
> >>
>
> >> aspect ratios or with different labels, so the images are not the same
>
> >>
>
> >> size. I want to align the left and right right sides of the frames in =
a
>
> >>
>
> >> GraphicsColumn. I use ImagePadding but this is very clumsy and has to =
be
>
> >>
>
> >> redone for every set of frames. Mathematica uses, for all its sizings,
>
> >>
>
> >> the complete outline of the figure, with labels and so on, not just th=
e
>
> >>
>
> >> frame. For publications the frames have to be aligned.
>
> >>
>
> > [cut]
>
> >
>
> > This has always been awkward to do. Though the ImagePadding approach ma=
y suffice for many cases, it works at the wrong level of abstraction.
>
> >
>
> > WRI should consider a new Alignment option value of "Axes", "Frame", or=
 "PlotRegion" in the Column and Grid family of commands.
>
> >
>
> > Vince
>
> >

[toc] | [prev] | [next] | [standalone]


#13177

FromVincent Virgilio <vincent.virgilio@outlook.com>
Date2013-01-17 04:15 +0000
Message-ID<kd7ts5$q3n$1@smc.vnet.net>
In reply to#13121
Yes. That example was probably in my unconscious as I wrote. Without something like this, we're stuck winding our way through one-liners and hyperlinks. Like Crowther's Adventure game. ("You are standing at the end of a road . . .") Vince > Subject: Re: Aligning graphics on frame boundaries
> From: murray@math.umass.edu
> Date: Wed, 16 Jan 2013 11:13:39 -0500
> CC: support@wolfram.com
> To: mathgroup@smc.vnet.net
>
> Yes! A superb idea!
>
> Something like what one sees for LaTeX page dimensions, say at:
>
>   http://en.wikibooks.org/wiki/LaTeX/Page_Layout
>
>
> On Jan 16, 2013, at 1:39 AM, Vince Virgilio <blueschi@gmail.com> wrote:
>
> > I think we need a visual guide for the various size-like options, across the commands that take them. One page of the visual guide for each kind of usage; all the better if a single page will do. If it was given enough weight at WRI, it could serve as a sanity check for new plot commands.
> >
> > Vince
> >
> > On Monday, January 14, 2013 11:27:36 PM UTC-5, James Stein wrote:
> >> Vince:
> >>
> >>
> >>
> >> I agree with your comments and suggestions.
> >>
> >> However, the situation is worse that you suggest.
> >>
> >> The interactions between ImageSize, FrameSize and their associated
> >>
> >> implicit paddings is incompletely documented,
> >>
> >> and is documented as if the documented behavior is independent of the
> >>
> >> kind of Graphics involved, which is is not.
> >>
> >>
> >>
> >> By coincidence, I reported this problem here on the MathGroup just a
> >>
> >> few days ago, showing that 'Frame' acts differently upon ListPlot and
> >>
> >> DateListPlot:
> >>
> >>
> >>
> >> Clear[f, i3, g, d3];
> >>
> >> d3 = {{{2012, 1, 1}, 1}, {{2012, 2, 1}, 2}, {{2012, 3, 1}, 3}};
> >>
> >> i3 = d3[[All, 2]];
> >>
> >> Print["d3=", d3 // MatrixForm, "  i3=", i3];
> >>
> >> f[b_] := ListPlot[i3, Frame -> b] // Framed;
> >>
> >> g[b_] := DateListPlot[d3, Frame -> b] // Framed;
> >>
> >> {{f[True], f[False]}, {g[True], g[False]}}
> >>
> >>
> >>
> >> Three of the four results are the same size; the lower right result is
> >>
> >> smaller than the others:
> >>
> >> It seems that applying a Frame, or not, does not change the size of a
> >>
> >> plot produced by ListPlot, but does change the size of a plot produced
> >>
> >> by DateListPlot.
> >>
> >>
> >>
> >> I seek an explanation for this behavior.
> >>
> >>
> >>
> >>
> >>
> >> On Sun, Jan 13, 2013 at 9:01 PM, Vince Virgilio wrote:
> >>
> >>> On Saturday, January 12, 2013 9:51:10 PM UTC-5, Bruce Shore wrote:
> >>
> >>>> I would like to align, within GraphicsColumn, two or more plots on their
> >>
> >>>>
> >>
> >>>> frame boundaries, using Mathematica 7. Back in Jan 2008 this quest=
ion
> >>
> >>>>
> >>
> >>>> was raised by  Szabolcs Horv=E1t, so maybe it is answered, but=
 I do =
> > not
> >>
> >>>>
> >>
> >>>> find  the answer in the archives, only the question.
> >>
> >>>>
> >>
> >>>>
> >>
> >>>>
> >>
> >>>> My question is the same as his: I have two or more plots, with dif=
fere=
> > nt
> >>
> >>>>
> >>
> >>>> aspect ratios or with different labels, so the images are not the =
same
> >>
> >>>>
> >>
> >>>> size. I want to align the left and right right sides of the frames i=
n =
> > a
> >>
> >>>>
> >>
> >>>> GraphicsColumn. I use ImagePadding but this is very clumsy and has t=
o =
> > be
> >>
> >>>>
> >>
> >>>> redone for every set of frames. Mathematica uses, for all its sizi=
ngs,
> >>
> >>>>
> >>
> >>>> the complete outline of the figure, with labels and so on, not j=
ust th=
> > e
> >>
> >>>>
> >>
> >>>> frame. For publications the frames have to be aligned.
> >>
> >>>>
> >>
> >>> [cut]
> >>
> >>>
> >>
> >>> This has always been awkward to do. Though the ImagePadding approach =
ma=
> > y suffice for many cases, it works at the wrong level of abstraction.
> >>
> >>>
> >>
> >>> WRI should consider a new Alignment option value of "Axes", "Frame"=
, or=
> > "PlotRegion" in the Column and Grid family of commands.
> >>
> >>>
> >>
> >>> Vince
> >>
> >>>
> >
>
> ---
> Murray Eisenberg                                    murray@math.umass.edu
> Mathematics & Statistics Dept.      
> Lederle Graduate Research Tower            phone 413 549-1020 (H)
> University of Massachusetts                               413 545-2838 (W=
)
> 710 North Pleasant Street                         fax   413 545-1801
> Amherst, MA 01003-9305
>
>
>
>
>

[toc] | [prev] | [next] | [standalone]


#13181

FromMurray Eisenberg <murray@math.umass.edu>
Date2013-01-17 04:14 +0000
Message-ID<kd7trv$q3i$1@smc.vnet.net>
In reply to#13121
Yes! A superb idea!

Something like what one sees for LaTeX page dimensions, say at:

  http://en.wikibooks.org/wiki/LaTeX/Page_Layout


On Jan 16, 2013, at 1:39 AM, Vince Virgilio <blueschi@gmail.com> wrote:

> I think we need a visual guide for the various size-like options, =
across the commands that take them. One page of the visual guide for =
each kind of usage; all the better if a single page will do. If it was =
given enough weight at WRI, it could serve as a sanity check for new =
plot commands.
>
> Vince
>
> On Monday, January 14, 2013 11:27:36 PM UTC-5, James Stein wrote:
>> Vince:
>>
>>
>>
>> I agree with your comments and suggestions.
>>
>> However, the situation is worse that you suggest.
>>
>> The interactions between ImageSize, FrameSize and their associated
>>
>> implicit paddings is incompletely documented,
>>
>> and is documented as if the documented behavior is independent of the
>>
>> kind of Graphics involved, which is is not.
>>
>>
>>
>> By coincidence, I reported this problem here on the MathGroup just a
>>
>> few days ago, showing that 'Frame' acts differently upon ListPlot and
>>
>> DateListPlot:
>>
>>
>>
>> Clear[f, i3, g, d3];
>>
>> d3 = {{{2012, 1, 1}, 1}, {{2012, 2, 1}, 2}, {{2012, 3, 1}, 3}};
>>
>> i3 = d3[[All, 2]];
>>
>> Print["d3=", d3 // MatrixForm, "  i3=", i3];
>>
>> f[b_] := ListPlot[i3, Frame -> b] // Framed;
>>
>> g[b_] := DateListPlot[d3, Frame -> b] // Framed;
>>
>> {{f[True], f[False]}, {g[True], g[False]}}
>>
>>
>>
>> Three of the four results are the same size; the lower right result =
is
>>
>> smaller than the others:
>>
>> It seems that applying a Frame, or not, does not change the size of a
>>
>> plot produced by ListPlot, but does change the size of a plot =
produced
>>
>> by DateListPlot.
>>
>>
>>
>> I seek an explanation for this behavior.
>>
>>
>>
>>
>>
>> On Sun, Jan 13, 2013 at 9:01 PM, Vince Virgilio wrote:
>>
>>> On Saturday, January 12, 2013 9:51:10 PM UTC-5, Bruce Shore wrote:
>>
>>>> I would like to align, within GraphicsColumn, two or more plots on =
the=
> ir
>>
>>>>
>>
>>>> frame boundaries, using Mathematica 7. Back in Jan 2008 this =
question
>>
>>>>
>>
>>>> was raised by  Szabolcs Horv=E1t, so maybe it is answered, but I =
do =
> not
>>
>>>>
>>
>>>> find  the answer in the archives, only the question.
>>
>>>>
>>
>>>>
>>
>>>>
>>
>>>> My question is the same as his: I have two or more plots, with =
differe=
> nt
>>
>>>>
>>
>>>> aspect ratios or with different labels, so the images are not the =
same
>>
>>>>
>>
>>>> size. I want to align the left and right right sides of the frames =
in =
> a
>>
>>>>
>>
>>>> GraphicsColumn. I use ImagePadding but this is very clumsy and has =
to =
> be
>>
>>>>
>>
>>>> redone for every set of frames. Mathematica uses, for all its =
sizings,
>>
>>>>
>>
>>>> the complete outline of the figure, with labels and so on, not just =
th=
> e
>>
>>>>
>>
>>>> frame. For publications the frames have to be aligned.
>>
>>>>
>>
>>> [cut]
>>
>>>
>>
>>> This has always been awkward to do. Though the ImagePadding approach =
ma=
> y suffice for many cases, it works at the wrong level of abstraction.
>>
>>>
>>
>>> WRI should consider a new Alignment option value of "Axes", "Frame", =
or=
> "PlotRegion" in the Column and Grid family of commands.
>>
>>>
>>
>>> Vince
>>
>>>
>

---
Murray Eisenberg                                    =
murray@math.umass.edu
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower            phone 413 549-1020 (H)
University of Massachusetts                               413 545-2838 =
(W)
710 North Pleasant Street                         fax   413 545-1801
Amherst, MA 01003-9305





[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web