> 1. I am creating a pie chart from a survey. I made the
> pievalues with count() and pielabels with the column name using a
> group by. Is it possible to also have the labels show the count. For
> example the label would say Yes(35) or No (65).
>
Use concat to make the labels:
plot piechart
pielabels, pievalues
select
concat(category, '(', count(*), ')'), count(*)
from myTable
group by category;
> 2. Is it possible to create multiple graphs in one easy step?
> We have 80 questions that are all answered 1, 2, 3, or 4. All of the
> columns are call Q1, Q2, etc. Is there any quick tricks to make all
> the charts?
If I understand you correctly, you want to use the same chart setup
info to make 80 charts. That's enough that you will want to generate
PLOT
statements using another language. In Java, it would be something
like this:
for(i=0; i <= 80; i++) {
System.out.println(
"plot piechart\n" +
" pielabels, pievalues\n" +
"select \n" +
" category, count(*) from mytable\n"+
" where grade = " + i + ";"
}
Bash, php, perl etc. will all work too.
Route the output into a file, and run the result from
the desktop or command line to debug it. Then you have
a reusable script.
Interesting question: Would it be this simple in Excel?
- Tod