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


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

Right margin in pm3d plot not correct when using cblabel and postscript terminal

Started byUwe Scholz <nurfuernews@web.de>
First post2011-04-04 22:02 +0000
Last post2011-04-06 20:07 +0000
Articles 5 — 3 participants

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


Contents

  Right margin in pm3d plot not correct when using cblabel and postscript terminal Uwe Scholz <nurfuernews@web.de> - 2011-04-04 22:02 +0000
    Re: Right margin in pm3d plot not correct when using cblabel and postscript terminal Christoph Bersch <usenet@bersch.net> - 2011-04-05 08:59 +0200
      Re: Right margin in pm3d plot not correct when using cblabel and postscript terminal Uwe Scholz <nurfuernews@web.de> - 2011-04-05 19:51 +0000
    Re: Right margin in pm3d plot not correct when using cblabel and postscript terminal Petr Mikulik <mikulik@physics.muni.cz> - 2011-04-06 08:42 +0000
      Re: Right margin in pm3d plot not correct when using cblabel and postscript terminal Uwe Scholz <nurfuernews@web.de> - 2011-04-06 20:07 +0000

#212 — Right margin in pm3d plot not correct when using cblabel and postscript terminal

FromUwe Scholz <nurfuernews@web.de>
Date2011-04-04 22:02 +0000
SubjectRight margin in pm3d plot not correct when using cblabel and postscript terminal
Message-ID<indf50$27v$1@news.albasani.net>
Hello,

as you can see in the subject, I have problems plotting a cblabel at the 
right side of a pm3d plot when using postscript terminal. An example:

#####
set pm3d map
set cblabel '{/Symbol a} [Gy^{-1}]'
set terminal postscript eps enhanced 16 rounded color
set output 'Test.eps'
splot 'Data.dat' using 1:2:($3/100) w pm3d
unset output
system 'epstopdf Test.eps && rm Test.eps'
####

The file Data.dat contains:

10 10    1.10
10 100   0.23
10 1000  0.12

20 10    1.10
20 100   0.29
20 1000  0.16

Only "-1" is visible in the final pdf on the right side. 

The cblabel is correctly displayed if I change the splot command line to

splot 'Data.dat' using 1:2:($3/10) w pm3d

so that the tics on the cblabel are not so wide. Is this a bug or is there 
a way to automatically adjust the right margin of the plot? Setting 
rmargin does not seem to have any effect.

I'm using gnuplot version 4.4 patchlevel 2 (Gentoo revision r1) on a 
current stable gentoo.

Thanks in advance
Uwe Scholz

PS: By editing the bounding box in the eps file before converting it to 
pdf it is possible to see the whole cblabel. But this is only a 
workaround by now and no solution... :-|

[toc] | [next] | [standalone]


#213

FromChristoph Bersch <usenet@bersch.net>
Date2011-04-05 08:59 +0200
Message-ID<ineeld$2c4l$1@gwdu112.gwdg.de>
In reply to#212
On 05.04.2011 00:02, Uwe Scholz wrote:
> Hello,
>
> as you can see in the subject, I have problems plotting a cblabel at the
> right side of a pm3d plot when using postscript terminal.
[...]
>
> so that the tics on the cblabel are not so wide. Is this a bug or is there
> a way to automatically adjust the right margin of the plot?

> Setting rmargin does not seem to have any effect.

Setting the rmargin works for the CVS version. Try with
set rmargin screen 0.8

Interestingly, the right margin is correct, if I use

set cbtics format '%.3f'

which gives you the same number of digits as the default format '%g'.

But I do not know, where this difference comes from. And, If you need 
even more digits, the margin is not correct again.

Christoph

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


#215

FromUwe Scholz <nurfuernews@web.de>
Date2011-04-05 19:51 +0000
Message-ID<infrrm$spf$1@news.albasani.net>
In reply to#213
On Tue, 05 Apr 2011 08:59, Christoph Bersch wrote:

> On 05.04.2011 00:02, Uwe Scholz wrote:
>> 
>> [..]
>> so that the tics on the cblabel are not so wide. Is this a bug or is
>> there a way to automatically adjust the right margin of the plot?
> 
>> Setting rmargin does not seem to have any effect.
> 
> Setting the rmargin works for the CVS version. 

Nice to hear. Hopefully it will be stable some day :-) Nevertheless, the 
complete color box label should be visible without any margin tweaking, 
right? Does it show up correctly in the CVS version without doing so?

> Try with set rmargin screen 0.8

This moves the hole plot to the left, also the cblabel. Thanks! By 
adjusting lmargin, the plot looks as I want. This is of course only a 
workarount, but it's a shorter one than directly editing the eps-file.


> Interestingly, the right margin is correct, if I use
> 
> set cbtics format '%.3f'
> 
> which gives you the same number of digits as the default format '%g'.
> 
> But I do not know, where this difference comes from. And, If you need
> even more digits, the margin is not correct again.

Thanks for trying this. I can confirm this strange beaviour here.

Greatings
Uwe Scholz

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


#217

FromPetr Mikulik <mikulik@physics.muni.cz>
Date2011-04-06 08:42 +0000
Message-ID<Pine.LNX.4.64.1104061040140.3561@monoceros.physics.muni.cz>
In reply to#212
> #####
> set pm3d map
> set cblabel '{/Symbol a} [Gy^{-1}]'
> set terminal postscript eps enhanced 16 rounded color
> set output 'Test.eps'
> splot 'Data.dat' using 1:2:($3/100) w pm3d
> unset output
> system 'epstopdf Test.eps && rm Test.eps'
> ####
>
> PS: By editing the bounding box in the eps file before converting it to 
> pdf it is possible to see the whole cblabel. But this is only a 
> workaround by now and no solution...

Yes, it is a solution; thus use the following automation solution (as you 
should do for any eps figure to be included in another document):

system 'epstopdf Test.eps && fixbb Test.eps && rm Test.eps'

---
PM

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


#220

FromUwe Scholz <nurfuernews@web.de>
Date2011-04-06 20:07 +0000
Message-ID<inih5j$4ql$1@news.albasani.net>
In reply to#217
On Wed, 06 Apr 2011 08:42:01 +0000, Petr Mikulik wrote:

>> PS: By editing the bounding box in the eps file before converting it to
>> pdf it is possible to see the whole cblabel. But this is only a
>> workaround by now and no solution...
> 
> Yes, it is a solution; thus use the following automation solution (as
> you should do for any eps figure to be included in another document):
> 
> system 'epstopdf Test.eps && fixbb Test.eps && rm Test.eps'

Great! This script works for me. How could I lived without it?

Though, the gnuplot line must be:
system 'fixbb Test.eps && epstopdf Test.eps && rm Test.eps'

Many thanks!
Uwe

[toc] | [prev] | [standalone]


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


csiph-web