All,
I am looking for a way to show pre- and post- survey questions next to each other in a bar graph. The possible responses (strongly disagree throuhg strongly agree) should be in the x-axis, and the number of recipients responding in each of those catagories should be in y-axis. However, I want to show the values of each response value next to each other to show the before and after affect of the exercise. I can get the groups next to each other with graph builder, but I can't get the "strongly disagree" values to be grouped together, etc. Any help would be greatly appreciated.
- Nathan
This would be easier to answer is there were more details, for example what do you mean by groups? Groups of questions or groups of respondents. Often it is easier to arrange bars when the data is stacked.
If you can show the layout of your data without showing the specific values that would be helpful.
다음은 5 가지 주제 및 20 명의 응답자 각각에 대해 15 가지 질문에 대한 데이터를 시뮬레이션하는 표를 생성하는 스크립트입니다. 귀하의 데이터가 어떻게 구성되어 있는지 전혀 모르겠습니다. THSI 테이블에는 300 행 (20 x 5 x 3), 식별자 열 (응답자, 질문 ID, 성별, 주제, 사전 및 게시물)이 있습니다.
사전 / 사후 막대가 나란히 배치 될 수 있도록 데이터를 쌓아야합니다. 즉, 이전 / 이후는 각 응답의 레이블입니다.
다음은 하나의 디스플레이 / 예제 디스플레이입니다. 스크립트는 일부 데이터를 생성하고 데이터를 스택에 저장 한 다음이 그래프를 그림 아래에 만듭니다.

Names Default to Here(1);
//Simulate a table of survey responses 20 respondents 15 questions: 3 questions per topic and 5 topics
//Gender is a respondent group, Topic is a question group
//responses are the Likert Scale
dt = New Table("Survey",
New Column("Respondent", Character, Nominal),
New Column ("Gender", Character, Nominal),
New Column("Question ID", Character, Ordinal),
New Column("Topic", Character, Nominal),
New Column("Pre", Ordinal),
New Column("Post", Ordinal)
);
dt << add rows(300);
dt:Pre << Value Labels(
{1 = "Strongly Disagree", 2 = "Disagree", 3 = "Neutral", 4 = "Agree",
5 = "Strongly Agree"}
);
dt:Post << Value Labels(
{1 = "Strongly Disagree", 2 = "Disagree", 3 = "Neutral", 4 = "Agree",
5 = "Strongly Agree"}
);
dt:Respondent << Set Each Value( Right("00" || Char(Sequence(1,20,1,15)),3) );
dt:Question ID << Set Each Value("Q" || Right("0"||char(Sequence(1,15,1,1)),2));
dt:Gender[1::150]="F";
dt:Gender[151::300]="M";
tlist = {"Food", "Technology", "Environment", "Energy", "Education" };
dt:Topic << Set Each Value( tlist[Sequence(1,5,1,3)]);
dt:Pre << Set Each Value(Random Integer(1,5));
//create some interest
dt:Post << Set Each Value(If(:Gender=="F" & :Pre==5, 5,
:Gender=="F", :Pre + 1,
:Gender=="M" & :Pre==1, 1,
:Gender=="M", :Pre -1
));
dt:Topic << Set Property("Value Ordering",
{"Food", "Technology", "Environment", "Energy", "Education"}
);
//Step2: Stack the table - the label for the data will be Pre and Post and as an Overlay variable for
//GraphBuilder the bars will be side by side
dt_stck= dt << Stack(
columns( :Pre, :Post ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ), Output Table Name("Stacked Pre Post Survey")
);
//Make sure Pre is ordered before Post
dt_stck:Label << Set Property("Value Ordering", {"Pre", "Post"});
gb = dt_stck << Graph Builder( // draw graph
Size( 881, 707 ),
Show Control Panel( 0 ),
Graph Spacing( 6 ),
Variables( X( :Data ), Wrap( :Question ID ), Overlay( :Label ) ),
Elements(
Bar( X, Legend( 13 ), Summary Statistic( "N" ), Label( "Label by Value" ) )
),
SendToReport(
Dispatch(
{},
"",
ScaleBox,
{Min( 0 ), Max( 12.5 ), Inc( 1 ), Minor Ticks( 0 ),
Label Row( Show Major Grid( 1 ) )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
13,
Properties( 0, {Fill Color( -10592673 )}, Item ID( "Pre", 1 ) ),
Properties(
1,
{Fill Color( 37 ), Fill Pattern( "left slant heavy b" )},
Item ID( "Post", 1 )
)
)}
)
)
);