How can I align X axis tickers of all subplots in a figure?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I align X axis tickers of all subplots in a figure?

Boris Ljevar-2
Depending on the range of Y axis, X axis of different subplots can
become shorter or longer, although the X axis is common for all subplots
and always has the fixed range.

I shall try to illustrate the problem. Suppose two graphs shown below
are plotted as subplots in a figure.

    |          |          |          |
0.8 |----------------------------------
    |          |          |          |
0.6 |----------------------------------
    |          |          |          |
0.4 |----------------------------------
____|__________|__________|__________|_
    |0         |1         |2         |3    

       |         |         |         |
-10000 |-------------------------------
       |         |         |         |
       |         |         |         |
-20000 |-------------------------------
       |         |         |         |
       |         |         |         |
-30000 |-------------------------------
_______|_________|_________|_________|_
       |0        |1        |2        |3


Please notice that in both graphs X axis has the same range 0-3.
Please also notice that one axis is more compressed than the other.

These two graphs are places in a single figure for easier viewing and
comparison. However due to misalignment of the X axis the comparison is
difficult.

Is there a way to align the X axis values?

operating system: linux openSUSE 11.0
octave version: 3.0.2-2.1 (i586)
gnuplot version: 4.2.3-27.1 (i586)



_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

How can I align X axis tickers of all subplots in a figure?

John W. Eaton
Administrator
On 15-Jan-2009, Boris Ljevar wrote:

| Depending on the range of Y axis, X axis of different subplots can
| become shorter or longer, although the X axis is common for all subplots
| and always has the fixed range.
|
| I shall try to illustrate the problem. Suppose two graphs shown below
| are plotted as subplots in a figure.
|
|     |          |          |          |
| 0.8 |----------------------------------
|     |          |          |          |
| 0.6 |----------------------------------
|     |          |          |          |
| 0.4 |----------------------------------
| ____|__________|__________|__________|_
|     |0         |1         |2         |3    
| ?
|        |         |         |         |
| -10000 |-------------------------------
|        |         |         |         |
|        |         |         |         |
| -20000 |-------------------------------
|        |         |         |         |
|        |         |         |         |
| -30000 |-------------------------------
| _______|_________|_________|_________|_
|        |0        |1        |2        |3
|
|
| Please notice that in both graphs X axis has the same range 0-3.
| Please also notice that one axis is more compressed than the other.
|
| These two graphs are places in a single figure for easier viewing and
| comparison. However due to misalignment of the X axis the comparison is
| difficult.
|
| Is there a way to align the X axis values?
|
| ?operating system: linux openSUSE 11.0
| ?octave version: 3.0.2-2.1 (?i586)
| gnuplot version: 4.2.3-27.1 (i586)
|
|
|
| _______________________________________________
| Help-octave mailing list
| [hidden email]
| https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

I think this problem is fixed in the current development sources.  I
don't think there is a simple fix for Octave 3.0.x.

jwe
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How can I align X axis tickers of all subplots in a figure?

bpabbott
Administrator
In reply to this post by Boris Ljevar-2

On Jan 14, 2009, at 6:38 PM, Boris Ljevar wrote:

> Depending on the range of Y axis, X axis of different subplots can
> become shorter or longer, although the X axis is common for all  
> subplots
> and always has the fixed range.
>
> I shall try to illustrate the problem. Suppose two graphs shown below
> are plotted as subplots in a figure.
>
>    |          |          |          |
> 0.8 |----------------------------------
>    |          |          |          |
> 0.6 |----------------------------------
>    |          |          |          |
> 0.4 |----------------------------------
> ____|__________|__________|__________|_
>    |0         |1         |2         |3
>
>       |         |         |         |
> -10000 |-------------------------------
>       |         |         |         |
>       |         |         |         |
> -20000 |-------------------------------
>       |         |         |         |
>       |         |         |         |
> -30000 |-------------------------------
> _______|_________|_________|_________|_
>       |0        |1        |2        |3
>
>
> Please notice that in both graphs X axis has the same range 0-3.
> Please also notice that one axis is more compressed than the other.
>
> These two graphs are places in a single figure for easier viewing and
> comparison. However due to misalignment of the X axis the comparison  
> is
> difficult.
>
> Is there a way to align the X axis values?
>
> operating system: linux openSUSE 11.0
> octave version: 3.0.2-2.1 (i586)
> gnuplot version: 4.2.3-27.1 (i586)

This functionality is not yet available in a release. However, using  
the developer's sources the axes do line up properly.

Ben



_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave