[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plotting basics
From: |
Ben Abbott |
Subject: |
Re: Plotting basics |
Date: |
Fri, 21 Feb 2014 04:44:02 -0500 |
On Feb 21, 2014, at 4:00 AM, Byron Hawkins <address@hidden> wrote:
> Thanks for your reply. I don't understand about zeros in a logarithmic plot.
> What I need is very utilitarian, if mathematically nonsensical. The values
> are large, so the axis needs to be logarithmic, but some of the values are
> zero, and they should go down at the bottom just below one. It doesn't
> matter that the logarithmic range doesn't include that value, I just need to
> have the zeros drawn in that place which appears visually a bit below one,
> just like the value one appears visually a bit below two, etc. What is the
> convention for this? Should I change the values to 0.01 or something?
>
> My indices are just plain integers from 1 to 30. They work fine in the
> semilogy() function , but plot() won't accept them. Is it possible that
> plot() doesn't allow floating point values? But then why does semilogy()
> allow them?
I think you're misunderstanding what is happening.
The logarithm of "one" is equal to zero. The logarithm of "zero" is equal to
-infinity ... which is an infinite distance from "just below one".
Also neither plot() or semilog() are indexed. The index errors are related to
your variables.
Both plot() and semilogy() are designed to work with floating point values.
But only positive integers may be used to index an array.
If you'll provide the m-file code that is producing the errors, we'll be able
to examine it and figure out what is wrong.
Ben
- Plotting basics, Byron Hawkins, 2014/02/21
- Re: Plotting basics, Ben Abbott, 2014/02/21
- Message not available
- Re: Plotting basics,
Ben Abbott <=
- RE: Plotting basics, Damian Harty, 2014/02/21
- Message not available
- Re: Plotting basics, Ben Abbott, 2014/02/21
- RE: Plotting basics, Byron Hawkins, 2014/02/21
- Re: Plotting basics, Mike Miller, 2014/02/21
- RE: Plotting basics, Byron Hawkins, 2014/02/21
- Re: Plotting basics, Ben Abbott, 2014/02/21
RE: Plotting basics, Damian Harty, 2014/02/21