[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with appearance of plots
From: |
Ben Abbott |
Subject: |
Re: Problem with appearance of plots |
Date: |
Tue, 17 Feb 2009 12:18:07 -0500 |
On Tuesday, February 17, 2009, at 12:09PM, "Lennart O" <address@hidden> wrote:
>
>Ben Abbott wrote:
>>
>> On Feb 17, 2009, at 5:10 AM, Lennart O wrote:
>>
>>> Ben Abbott wrote:
>>>>
>>>> On Feb 16, 2009, at 6:29 PM, Lennart O wrote:
>>>>
>>>>>
>>>>> Hi I'm having a problem with plots that are not very pretty. It's
>>>>> almost like
>>>>> an old version of gnuplot is being used. The result looks very
>>>>> crude. I
>>>>> should mention that I am using Octave 3.0.1 on Ubuntu 8.10. I took
>>>>> some
>>>>> screenshots to show what I mean.
>>>>>
>>>>> Plot with Octave:
>>>>> http://www.nabble.com/file/p22048113/octave.png
>>>>>
>>>>> Plot with Gnuplot:
>>>>> http://www.nabble.com/file/p22048113/gnuplot.png
>>>>>
>>>>> Any idea how to fix this? Is it a problem with the Ubuntu package or
>>>>> do I
>>>>> need to change some settings in Octave?
>>>>>
>>>>> ps. Sorry about the images being so large.
>>>>
>>>> Octave is telling gnuplot to use the x11 terminal, and when you run
>>>> gnuplot directly it is using the wxt terminal.
>>>>
>>>> Try ...
>>>>
>>>> $ export GNUTERM=wxt
>>>> $ octave
>>>>
>>>> ... and then do some plots.
>>>>
>>>> Ben
>>>>
>>> Thank you very much, entering that into the terminal did the trick.
>>> Now I
>>> just need to figure out how to change which numbers are printed on the
>>> axises, theres' not enough room for them when doing a sublot. But
>>> that can
>>> be done with gnuplot syntax directly in the m-file, right?
>>
>> I think you're referring to the 2.1.x version of octave. Presently,
>> when using subplot, there are problems with the positioning of the
>> tick marks, axes labels, and titles.
>>
>> If you are referring to the horizontal spacing of the x-axis tick-
>> marks and tick-labels, you can change the defaults by
>>
>> set (hax, 'xtick', xticks)
>>
>> where hax is the handle to the axes and xticks is a vector containing
>> values for where you'd like the tick-mark labels placed.
>>
>>> Also, how do I make the GNUTERM export more permanent so I don't
>>> have to
>>> type it in every time I want to run Octave?
>>
>> You can place it in the startup script for the shell that runs octave.
>> For example, if you are running a bash shell, place it is ~/.bashrc.
>>
>> Ben
>>
>> p.s. There is presently a 3.0.3 version available that fixes some bugs
>> (soon there will be a 3.0.4). I recommend you update you installation.
>>
>>
>I am using version 3.0.1 but yes I should update.
>
>Thanks for your help, I got it all working now.
>I used: set(gca,'ytick',[-2 -1 0 1 2]). Not sure what 'gca' is, found it in
>another thread, except that it apparently is a handle for an axis. Just
>regurgitating what you said. :) Care to explain?
gca == Get Current Axes
Ben