Google Answers Logo
View Question
 
Q: MATLB: drawing bar graph in semi-log scale ( Answered 4 out of 5 stars,   0 Comments )
Question  
Subject: MATLB: drawing bar graph in semi-log scale
Category: Computers
Asked by: matlabuser-ga
List Price: $3.00
Posted: 11 Jan 2005 20:34 PST
Expires: 10 Feb 2005 20:34 PST
Question ID: 455873
In Matlab, how can I draw the bar graph in a semi-log scale? I know
this can be done easily from a plot command, but what I want is to
have a bar graph in semi-log scale.
Answer  
Subject: Re: MATLB: drawing bar graph in semi-log scale
Answered By: maniac-ga on 12 Jan 2005 19:00 PST
Rated:4 out of 5 stars
 
Hello Matlabuser,

The page at
  http://mathforum.org/epigone/comp.soft-sys.matlab/flelblerdvim
or more directly at
http://mathforum.org/epigone/comp.soft-sys.matlab/flelblerdvim/eef3ea3.1@webx.raydaftYaTP
describes a method that generates a chart that basically does what you
are asking for. The steps can be summarized as follows:

1. Plot a "simple" set of data as semilogx or [more likely] semilogy.

2. Hide the simple data plot (retaining the axes).

3. Plot the bars for that data, axes, and so on.

Note for step 3 that you need to avoid using zero as a value for the
log scale and pick a reasonable "upper limit" as well. The page I
refer to goes into more detail for a pair of data points.

Another alternative is to convert your Y values to log(Y). Then
generate your bar chart and provide the original Y values in another
way (e.g., label each bar with the original Y value or an accompanying
table).

Neither method is particularly elegant but both are feasible in
Matlab. Another alternative is to export the data and generate a
semilog chart using another tool such as Microsoft Excel, GNUplot
(free), or several other programs.

Search phrases included:
  matlab bar chart scale
  matlab bar chart semilog

  --Maniac
matlabuser-ga rated this answer:4 out of 5 stars

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy