[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extra tick marks at top x-axis: strategy?
From: |
Ben Abbott |
Subject: |
Re: extra tick marks at top x-axis: strategy? |
Date: |
Thu, 08 Sep 2011 10:24:18 -0400 |
On Sep 8, 2011, at 10:17 AM, indium wrote:
> Hi all,
>
> I have attempted to add extra tick marks to a plot by adding another
> x-axis that is positioned on 'top'. But then the original plot is
> 'blanked' by the following plot command. I saw this because the second
> set of axes is not 'perfectly' overlapping with the first set (it quite
> far off, actually).
>
> Is this the way to make these second sets of tick mark labels? I'd
> like to have for instance temperature on the x-axis on the bottom and
> inverse temperature tick marks on the top axis.
>
> If so, how do I realign those two axes? I have set the 'position' of the
> two the same, but I think that due to margins needed for the labels,
> title, etc, the axes do not overlap.
>
> many thanks for any suggestions!
To make the axis on top transparent set its color to "none", and its position
to that of the bottom axis. The code below is untested, and ax_top and ax_bot
refer to the handles for the top and bottom axes.
set (ax_bot, "activepositionproperty", "position")
set (ax_top, "position", get (ax_bot, "position"))
set (ax_top, "color", "none")
Ben