help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change position of x-axis


From: Juan Pablo Carbajal
Subject: Re: change position of x-axis
Date: Tue, 11 Oct 2011 19:08:14 +0200

On Tue, Oct 11, 2011 at 6:52 PM, Vlăduţ Frăţiman
<address@hidden> wrote:
> So need to modify source code and recompile? Seem to be an
> uncomfortable solution!
>
> On Tue, Oct 11, 2011 at 7:26 PM, Juan Pablo Carbajal
> <address@hidden> wrote:
>>
>> On Tue, Oct 11, 2011 at 6:21 PM, Juan Pablo Carbajal
>> <address@hidden> wrote:
>> > On Tue, Oct 11, 2011 at 5:56 PM, Juan Pablo Carbajal
>> > <address@hidden> wrote:
>> >> On Tue, Oct 11, 2011 at 4:42 PM, bpabbott <address@hidden> wrote:
>> >>> On Oct 11, 2011, at 10:28 AM, Juan Pablo Carbajal <address@hidden>
>> >>> wrote:
>> >>>
>> >>> On Tue, Oct 11, 2011 at 4:16 PM, Juan Pablo Carbajal <address@hidden>
>> >>> wrote:
>> >>>>
>> >>>> On Tue, Oct 11, 2011 at 2:44 PM, Ben Abbott <address@hidden> wrote:
>> >>>>>
>> >>>>> On Oct 11, 2011, at 8:29 AM, Vlăduţ Frăţiman wrote:
>> >>>>>
>> >>>>> Thanks!
>> >>>>>
>> >>>>> I already try'it that but seem to be an bug. My plot show an 
>> >>>>> intrerupted
>> >>>>> line and old axis don't disspear.
>> >>>>> I use octave 3.2.1 on Ubuntu 11.04. Plots are rendered with gnuplot.
>> >>>>> I put an image as attachament to see what i mean.
>> >>>>>
>> >>>>> <graf.png>
>> >>>>>
>> >>>>> It works correctly for me. Perhaps we're doing something else 
>> >>>>> differently
>> >>>>> that it producing a different result?
>> >>>>> The following works for me.
>> >>>>> close all
>> >>>>> clear all
>> >>>>> x = 0:0.1:10;
>> >>>>> y = sin(x)./(1+x) + x*01 - .4;
>> >>>>> plot (x, y);
>> >>>>> set (gca, "xaxislocation", "zero")
>> >>>>> print test.png
>> >>>>> preview test.png
>> >>>>> Does this work for you?
>> >>>>> Ben
>> >>>>
>> >>>> Ben,
>> >>>> please add the line
>> >>>>
>> >>>> set (gca, "box", "off")
>> >>>>
>> >>>> to see the remainding of the axis. This problem is even in the plot
>> >>>> "polar" when the box is switched off.
>> >>>
>> >>> Indeed,
>> >>> I posted this issue it in the help mailing list a few days ago
>> >>>
>> >>> http://octave.1599824.n4.nabble.com/Axis-issue-td3887910.html
>> >>>
>> >>>
>> >>> This may be a feature of gnuplot.
>> >>> If you'd like to experiment with gnuplot to see if the horizontal line at
>> >>> the bottom can be suppressed, you can save the gnuplot plotstream by ...
>> >>> drawnow ("png", "debug.png", false, "debug.gp")
>> >>> Then run gnuplot and type ...
>> >>> load "debug.gp"
>> >>> Each time you load "debug.gp" the file "debug.png" will be saved. You can
>> >>> try modifying the gnuplot commands in gnuplot.gp to get the desired 
>> >>> result.
>> >>> If you're successful, I should be able to modify Octave's sources to fix
>> >>> this.
>> >>> Ben
>> >>>
>> >>>
>> >>>
>> >>
>> >> Hi Ben,
>> >>
>> >> Thanks for that. I am doing what you suggested, but I get binary code
>> >> or something like that in debug.gp. How do you edit this files?
>> >>
>> >> --
>> >> M. Sc. Juan Pablo Carbajal
>> >> -----
>> >> PhD Student
>> >> University of Zürich
>> >> http://ailab.ifi.uzh.ch/carbajal/
>> >>
>> >
>> > Ben,
>> > Ok, I found the problem.
>> > As I see it, when set(gca,'box','off') is executed, the stream to gnuplot 
>> > adds
>> >> unset y2tics; set ytics in nomirror
>> >> unset x2tics; set xtics in nomirror
>> >> set border 3;
>> >
>> > The last line is the problem. With this I see that box off in octave
>> > means "axes in the left-botom margins".
>> >
>> > I see three possible solutions:
>> > 1. Make set(gca,'box','off') deal with the current state of axis.
>> > 2. Make set(gca,'box','off') be gnuplot's "unset border"
>> > 3. Make set(gca,'yaxislocation','zero') be gnuplot's "set yzeroaxis;
>> > set border 1; "
>> >    Make set(gca,'xaxislocation','zero') be gnuplot's "set xzeroaxis;
>> > set border 2; "
>> >
>> > Thanks
>> >
>> > --
>> > M. Sc. Juan Pablo Carbajal
>> > -----
>> > PhD Student
>> > University of Zürich
>> > http://ailab.ifi.uzh.ch/carbajal/
>> >
>>
>> I forgot to add that the last solution (number 3) is a solution when
>> not both axis are placed to the origin. When both are placed to the
>> origin the only solution is to make box off be "unset border" fro
>> gnuplot.
>>
>> Thanks
>>
>>
>> --
>> M. Sc. Juan Pablo Carbajal
>> -----
>> PhD Student
>> University of Zürich
>> http://ailab.ifi.uzh.ch/carbajal/
>
>
>
> --
> Cu stimă,
> prof. Frăţiman Vlăduţ
>

Dear  Frăţiman Vlăduţ

We are community made of volunteers. If you want a more ready to use
solution you can always invest some money and get your problems
resolved. Indeed, there are a couple of programmers for hire in the
Octave project, or you can directly support the developers of Octave.
The Octave community will really appreciate your contribution.

Otherwise you will have to wait till we have time to fix the problem.

btw, you can follow Ben's suggestion and add "unset border" at the end
of the command list and get the png without the lines.


-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]