Hi.
Suppose a user wants to create a "bars stacked" plot, with ordered stacking and grouping categories.
How can this be accomplished reliably? If the outputs from the following process are plotted, either the x-axis is out of order, or the stacking categories are out of order, depending on how the data is sorted. This is the minimal exampleset that induces this problem.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.005">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data_user_specification" compatibility="5.3.005" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="45" y="300">
<list key="attribute_values">
<parameter key="StackBy" value=""red""/>
<parameter key="GroupBy" value=""b""/>
<parameter key="Value" value="1"/>
</list>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="generate_data_user_specification" compatibility="5.3.005" expanded="true" height="60" name="Generate Data by User Specification (2)" width="90" x="45" y="210">
<list key="attribute_values">
<parameter key="StackBy" value=""blue""/>
<parameter key="GroupBy" value=""b""/>
<parameter key="Value" value="1"/>
</list>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="generate_data_user_specification" compatibility="5.3.005" expanded="true" height="60" name="Generate Data by User Specification (3)" width="90" x="45" y="390">
<list key="attribute_values">
<parameter key="StackBy" value=""red""/>
<parameter key="GroupBy" value=""a""/>
<parameter key="Value" value="1"/>
</list>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="append" compatibility="5.3.005" expanded="true" height="112" name="Append" width="90" x="313" y="255"/>
<operator activated="true" class="sort" compatibility="5.3.005" expanded="true" height="76" name="sort by GroupBy" width="90" x="514" y="255">
<parameter key="attribute_name" value="GroupBy"/>
</operator>
<operator activated="true" class="sort" compatibility="5.3.005" expanded="true" height="76" name="sort by StackBy" width="90" x="648" y="255">
<parameter key="attribute_name" value="StackBy"/>
</operator>
<connect from_op="Generate Data by User Specification" from_port="output" to_op="Append" to_port="example set 2"/>
<connect from_op="Generate Data by User Specification (2)" from_port="output" to_op="Append" to_port="example set 1"/>
<connect from_op="Generate Data by User Specification (3)" from_port="output" to_op="Append" to_port="example set 3"/>
<connect from_op="Append" from_port="merged set" to_op="sort by GroupBy" to_port="example set input"/>
<connect from_op="sort by GroupBy" from_port="example set output" to_op="sort by StackBy" to_port="example set input"/>
<connect from_op="sort by StackBy" from_port="example set output" to_port="result 1"/>
<connect from_op="sort by StackBy" from_port="original" to_port="result 2"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
<portSpacing port="sink_result 3" spacing="0"/>
</process>
</operator>
</process>
How can it be solved, so that both the stacking order and the x-axis order are correct?
(It is important to have consistently ordered colors/categories when multiple plots need to be compared within/across reports, for example.)
Regards
Isak