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


Groups > comp.graphics.apps.gnuplot > #229 > unrolled thread

Size of very plot and position of labels

Started bySebastian Schubert <schubert.seb@googlemail.com>
First post2011-04-11 16:04 +0200
Last post2011-04-13 10:41 +0200
Articles 6 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  Size of very plot and position of labels Sebastian Schubert <schubert.seb@googlemail.com> - 2011-04-11 16:04 +0200
    Re: Size of very plot and position of labels Christoph Bersch <usenet@bersch.net> - 2011-04-11 16:56 +0200
      Re: Size of very plot and position of labels Sebastian Schubert <schubert.seb@googlemail.com> - 2011-04-12 15:51 +0200
        Re: Size of very plot and position of labels Christoph Bersch <usenet@bersch.net> - 2011-04-12 16:23 +0200
          Re: Size of very plot and position of labels Sebastian Schubert <schubert.seb@googlemail.com> - 2011-04-12 17:38 +0200
            Re: Size of very plot and position of labels Christoph Bersch <usenet@bersch.net> - 2011-04-13 10:41 +0200

#229 — Size of very plot and position of labels

FromSebastian Schubert <schubert.seb@googlemail.com>
Date2011-04-11 16:04 +0200
SubjectSize of very plot and position of labels
Message-ID<4da30a78$0$7654$9b4e6d93@newsspool1.arcor-online.net>
Hi,

I use the epslatex terminal. For a simple 2d plot, as far as I can see, the 
ylabel is always at the same y-position and the plot "box" (the box that 
includes the curves etc.) is adjusted to take the varying length of the axis 
labels into account. I would like to have a fixed position of the ylabel and 
a fixed size of the plot box. Of course, by doing so, I risk having the axis 
label text crash into ylabel but I'll just check the output.

What is the best way to do that?

Cheers
Sebastian

[toc] | [next] | [standalone]


#230

FromChristoph Bersch <usenet@bersch.net>
Date2011-04-11 16:56 +0200
Message-ID<inv4re$k0k$1@gwdu112.gwdg.de>
In reply to#229
On 11.04.2011 16:04, Sebastian Schubert wrote:
> I would like to have a fixed position of the ylabel and
> a fixed size of the plot box. Of course, by doing so, I risk having the axis
> label text crash into ylabel but I'll just check the output.
>
> What is the best way to do that?

To have a fixed left margin (e.g. of 20% of the whole size), you must use
set lmargin at screen 0.2

In case that for your different graphs the ytics digit count changes, 
you must use 'set label' instead of 'set ylabel', something like:

set label 'ylabel' center at screen 0.05, graph 0.5 rotate by 90

Christoph

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


#241

FromSebastian Schubert <schubert.seb@googlemail.com>
Date2011-04-12 15:51 +0200
Message-ID<4da458f5$0$7651$9b4e6d93@newsspool1.arcor-online.net>
In reply to#230
Dear Christoph,

Christoph Bersch wrote:

> On 11.04.2011 16:04, Sebastian Schubert wrote:
>> I would like to have a fixed position of the ylabel and
>> a fixed size of the plot box. Of course, by doing so, I risk having the
>> axis label text crash into ylabel but I'll just check the output.
>>
>> What is the best way to do that?


> In case that for your different graphs the ytics digit count changes,
> you must use 'set label' instead of 'set ylabel', something like:
> 
> set label 'ylabel' center at screen 0.05, graph 0.5 rotate by 90

Vielen Dank!

That was exactly what I needed. It would be nice if this was integrated into 
gnuplot somehow because this syntax (despite all the rotate and so on), one 
also has to unset the label of all the plots are generated by one script.

Sebastian

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


#243

FromChristoph Bersch <usenet@bersch.net>
Date2011-04-12 16:23 +0200
Message-ID<io1n8h$4so$1@gwdu112.gwdg.de>
In reply to#241
On 12.04.2011 15:51, Sebastian Schubert wrote:
> Dear Christoph,
>
> Christoph Bersch wrote:
>
>> On 11.04.2011 16:04, Sebastian Schubert wrote:
>>> I would like to have a fixed position of the ylabel and
>>> a fixed size of the plot box. Of course, by doing so, I risk having the
>>> axis label text crash into ylabel but I'll just check the output.
>>>
>>> What is the best way to do that?
>
>> In case that for your different graphs the ytics digit count changes,
>> you must use 'set label' instead of 'set ylabel', something like:
>>
>> set label 'ylabel' center at screen 0.05, graph 0.5 rotate by 90
>
> That was exactly what I needed. It would be nice if this was integrated into
> gnuplot somehow because this syntax (despite all the rotate and so on), one
> also has to unset the label of all the plots are generated by one script.

Sorry, but I don't understand what you mean. What should be integrated 
into gnuplot and for what reason?

I guess you need your graphics for a presentation where you overlay 
several plots. If so, this is a rather special case, in most other cases 
the default behaviour of 'set ylabel' to adapt to the ytics format, is 
desirable.

Christoph

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


#244

FromSebastian Schubert <schubert.seb@googlemail.com>
Date2011-04-12 17:38 +0200
Message-ID<4da47201$0$7662$9b4e6d93@newsspool1.arcor-online.net>
In reply to#243
Hi Christoph,

Christoph Bersch wrote:

> On 12.04.2011 15:51, Sebastian Schubert wrote:
>> Dear Christoph,
>>
>> Christoph Bersch wrote:
>>
>>> On 11.04.2011 16:04, Sebastian Schubert wrote:
>>>> I would like to have a fixed position of the ylabel and
>>>> a fixed size of the plot box. Of course, by doing so, I risk having the
>>>> axis label text crash into ylabel but I'll just check the output.
>>>>
>>>> What is the best way to do that?
>>
>>> In case that for your different graphs the ytics digit count changes,
>>> you must use 'set label' instead of 'set ylabel', something like:
>>>
>>> set label 'ylabel' center at screen 0.05, graph 0.5 rotate by 90
>>
>> That was exactly what I needed. It would be nice if this was integrated
>> into gnuplot somehow because this syntax (despite all the rotate and so
>> on), one also has to unset the label of all the plots are generated by
>> one script.
> 
> Sorry, but I don't understand what you mean. What should be integrated
> into gnuplot and for what reason?

I would like to see an easier way to set the position of the axis labels and 
the size of the plot box similar for different plots. So basically, for 
example, an option for ylabel so that it works exactly as you proposed above 
with label as a workaround. This would just make things simpler.


> I guess you need your graphics for a presentation where you overlay
> several plots. 

I did not think of that but yes, I don't like when things jump around there.

In my case, I want to align 6 plots on a page with latex. I prefer to do it 
in latex because I can reference the subfigures then. Five of the six share 
the same size of tics, just one is different and so is its plot box size. 
From my typographical feeling, the plots are as big as the plot box is. The 
axis labels are just additional text. Therefore, although all plots have the 
same size, they look of different size because of the changing plot box 
size.

> If so, this is a rather special case, in most other cases
> the default behaviour of 'set ylabel' to adapt to the ytics format, is
> desirable.

You have to decide whether my application above is a common one (I'd say 
yes).

Thanks a lot
Sebastian

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


#247

FromChristoph Bersch <usenet@bersch.net>
Date2011-04-13 10:41 +0200
Message-ID<io3nk6$206h$1@gwdu112.gwdg.de>
In reply to#244
Hi,

On 12.04.2011 17:38, Sebastian Schubert wrote:
>
> I would like to see an easier way to set the position of the axis labels and
> the size of the plot box similar for different plots. So basically, for
> example, an option for ylabel so that it works exactly as you proposed above
> with label as a workaround.

Maybe it helps you, that if you use a tag for the fixed-position ylabel, 
then you do not have to unset it before setting a new one:

set label 1 'ylabel' left at screen 0.05, graph 0.5 rotate by 90
set label 1 'ylabel' center at screen 0.05, graph 0.5 rotate by 90

sets only one label.

> In my case, I want to align 6 plots on a page with latex. I prefer to do it
> in latex because I can reference the subfigures then. Five of the six share
> the same size of tics, just one is different and so is its plot box size.
>  From my typographical feeling, the plots are as big as the plot box is. The
> axis labels are just additional text. Therefore, although all plots have the
> same size, they look of different size because of the changing plot box
> size.

I think the syntax of 'set lmargin' is simple enough, although it is not 
intuitive, that this is the way to get a fixed plot size. One could 
expect that 'set size' does something like that, but it does not and it 
does not have any reference to 'set margin'. I will propose an addition 
to the documentation for that.

>> If so, this is a rather special case, in most other cases
>> the default behaviour of 'set ylabel' to adapt to the ytics format, is
>> desirable.
>
> You have to decide whether my application above is a common one (I'd say
> yes).

me too :-)

Christoph

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web