how to draw multi series in scatter 3d

will_w7tl9
New Altair Community Member
plz take a look this demo -> jsfiddle.net/p5qxqshd

i've generated two csv file like this for test by using scatter 3d,
So i updated two attachments for test ,if anybody would help me
Thank you very much ~

i've generated two csv file like this for test by using scatter 3d,
x,y,z 0,3.339803706241991,3 0.1,3.3374696427494337,3 0.2,3.1172990941528935,3 0.3,3.489850784196743,3but i did not success ...
So i updated two attachments for test ,if anybody would help me

0
Best Answer
-
Hey @will_w7tl9 ,
You will need pre-processing of data tad bit. The plot will then look like below.
I have attached the XML code which you can use to replicate the process. If you are not aware of how use XML code in rapid miner check out this post : https://community.rapidminer.com/discussion/comment/32610#Comment_32610<?xml version="1.0" encoding="UTF-8"?><process version="9.6.000">
<context> <input/> <output/> <macros/> </context> <operator activated="true" class="process" compatibility="9.6.000" expanded="true" name="Process"> <parameter key="logverbosity" value="init"/> <parameter key="random_seed" value="2001"/> <parameter key="send_mail" value="never"/> <parameter key="notification_email" value=""/> <parameter key="process_duration_for_mail" value="30"/> <parameter key="encoding" value="SYSTEM"/> <process expanded="true"> <operator activated="true" class="read_csv" compatibility="9.6.000" expanded="true" height="68" name="Read CSV" width="90" x="179" y="34"> <parameter key="csv_file" value="C:UsersharshDownloadsline-all.csv"/> <parameter key="column_separators" value=","/> <parameter key="trim_lines" value="false"/> <parameter key="use_quotes" value="true"/> <parameter key="quotes_character" value="""/> <parameter key="escape_character" value=""/> <parameter key="skip_comments" value="true"/> <parameter key="comment_characters" value="#"/> <parameter key="starting_row" value="1"/> <parameter key="parse_numbers" value="true"/> <parameter key="decimal_character" value="."/> <parameter key="grouped_digits" value="false"/> <parameter key="grouping_character" value=","/> <parameter key="infinity_representation" value=""/> <parameter key="date_format" value=""/> <parameter key="first_row_as_names" value="true"/> <list key="annotations"/> <parameter key="time_zone" value="SYSTEM"/> <parameter key="locale" value="English (United States)"/> <parameter key="encoding" value="windows-1252"/> <parameter key="read_all_values_as_polynominal" value="false"/> <list key="data_set_meta_data_information"> <parameter key="0" value="x1.true.real.attribute"/> <parameter key="1" value="y1.true.real.attribute"/> <parameter key="2" value="z1.true.integer.attribute"/> <parameter key="3" value="x2.true.real.attribute"/> <parameter key="4" value="y2.true.real.attribute"/> <parameter key="5" value="z2.true.integer.attribute"/> </list> <parameter key="read_not_matching_values_as_missings" value="false"/> <parameter key="datamanagement" value="double_array"/> <parameter key="data_management" value="auto"/> </operator> <operator activated="true" class="multiply" compatibility="9.6.000" expanded="true" height="103" name="Multiply" width="90" x="313" y="34"/> <operator activated="true" class="select_attributes" compatibility="9.6.000" expanded="true" height="82" name="Select Attributes (2)" width="90" x="447" y="136"> <parameter key="attribute_filter_type" value="subset"/> <parameter key="attribute" value=""/> <parameter key="attributes" value="x2|y2|z2"/> <parameter key="use_except_expression" value="false"/> <parameter key="value_type" value="attribute_value"/> <parameter key="use_value_type_exception" value="false"/> <parameter key="except_value_type" value="time"/> <parameter key="block_type" value="attribute_block"/> <parameter key="use_block_type_exception" value="false"/> <parameter key="except_block_type" value="value_matrix_row_start"/> <parameter key="invert_selection" value="false"/> <parameter key="include_special_attributes" value="false"/> </operator> <operator activated="true" class="rename" compatibility="9.6.000" expanded="true" height="82" name="Rename (2)" width="90" x="581" y="136"> <parameter key="old_name" value="x2"/> <parameter key="new_name" value="x"/> <list key="rename_additional_attributes"> <parameter key="y2" value="y"/> <parameter key="z2" value="z"/> </list> </operator> <operator activated="true" class="generate_attributes" compatibility="9.6.000" expanded="true" height="82" name="Generate Attributes (2)" width="90" x="715" y="136"> <list key="function_descriptions"> <parameter key="Series" value=""Series2""/> </list> <parameter key="keep_all" value="true"/> </operator> <operator activated="true" class="select_attributes" compatibility="9.6.000" expanded="true" height="82" name="Select Attributes" width="90" x="447" y="34"> <parameter key="attribute_filter_type" value="subset"/> <parameter key="attribute" value=""/> <parameter key="attributes" value="x1|y1|z1"/> <parameter key="use_except_expression" value="false"/> <parameter key="value_type" value="attribute_value"/> <parameter key="use_value_type_exception" value="false"/> <parameter key="except_value_type" value="time"/> <parameter key="block_type" value="attribute_block"/> <parameter key="use_block_type_exception" value="false"/> <parameter key="except_block_type" value="value_matrix_row_start"/> <parameter key="invert_selection" value="false"/> <parameter key="include_special_attributes" value="false"/> </operator> <operator activated="true" class="rename" compatibility="9.6.000" expanded="true" height="82" name="Rename" width="90" x="581" y="34"> <parameter key="old_name" value="x1"/> <parameter key="new_name" value="x"/> <list key="rename_additional_attributes"> <parameter key="y1" value="y"/> <parameter key="z1" value="z"/> </list> </operator> <operator activated="true" class="generate_attributes" compatibility="9.6.000" expanded="true" height="82" name="Generate Attributes" width="90" x="715" y="34"> <list key="function_descriptions"> <parameter key="Series" value=""Series1""/> </list> <parameter key="keep_all" value="true"/> </operator> <operator activated="true" class="append" compatibility="9.6.000" expanded="true" height="103" name="Append" width="90" x="916" y="34"> <parameter key="datamanagement" value="double_array"/> <parameter key="data_management" value="auto"/> <parameter key="merge_type" value="all"/> </operator> <connect from_op="Read CSV" from_port="output" to_op="Multiply" to_port="input"/> <connect from_op="Multiply" from_port="output 1" to_op="Select Attributes" to_port="example set input"/> <connect from_op="Multiply" from_port="output 2" to_op="Select Attributes (2)" to_port="example set input"/> <connect from_op="Select Attributes (2)" from_port="example set output" to_op="Rename (2)" to_port="example set input"/> <connect from_op="Rename (2)" from_port="example set output" to_op="Generate Attributes (2)" to_port="example set input"/> <connect from_op="Generate Attributes (2)" from_port="example set output" to_op="Append" to_port="example set 2"/> <connect from_op="Select Attributes" from_port="example set output" to_op="Rename" to_port="example set input"/> <connect from_op="Rename" from_port="example set output" to_op="Generate Attributes" to_port="example set input"/> <connect from_op="Generate Attributes" from_port="example set output" to_op="Append" to_port="example set 1"/> <connect from_op="Append" from_port="merged set" to_port="result 1"/> <portSpacing port="source_input 1" spacing="0"/> <portSpacing port="sink_result 1" spacing="0"/> <portSpacing port="sink_result 2" spacing="0"/> </process> </operator> </process>
5
Answers
-
Hey @will_w7tl9,
I tried to plot a 3D scatter plot with your first csv, it looks like below figure. You can plot different series by setting series name as color in the plot.
0 -
Hi @hbajpai ,
Thank you so much for reply me ~
I am confused about how to set the z axis, especially when multiple series are displayed at the same time just like the jsfiddle.net/p5qxqshd demo.
If i provide a mix csv file,would you please let me know how to display two series with diffrent z-axis (z1,z2) using scatter 3d ?
Thanks !1 -
Hey @will_w7tl9 ,
You will need pre-processing of data tad bit. The plot will then look like below.
I have attached the XML code which you can use to replicate the process. If you are not aware of how use XML code in rapid miner check out this post : https://community.rapidminer.com/discussion/comment/32610#Comment_32610<?xml version="1.0" encoding="UTF-8"?><process version="9.6.000">
<context> <input/> <output/> <macros/> </context> <operator activated="true" class="process" compatibility="9.6.000" expanded="true" name="Process"> <parameter key="logverbosity" value="init"/> <parameter key="random_seed" value="2001"/> <parameter key="send_mail" value="never"/> <parameter key="notification_email" value=""/> <parameter key="process_duration_for_mail" value="30"/> <parameter key="encoding" value="SYSTEM"/> <process expanded="true"> <operator activated="true" class="read_csv" compatibility="9.6.000" expanded="true" height="68" name="Read CSV" width="90" x="179" y="34"> <parameter key="csv_file" value="C:UsersharshDownloadsline-all.csv"/> <parameter key="column_separators" value=","/> <parameter key="trim_lines" value="false"/> <parameter key="use_quotes" value="true"/> <parameter key="quotes_character" value="""/> <parameter key="escape_character" value=""/> <parameter key="skip_comments" value="true"/> <parameter key="comment_characters" value="#"/> <parameter key="starting_row" value="1"/> <parameter key="parse_numbers" value="true"/> <parameter key="decimal_character" value="."/> <parameter key="grouped_digits" value="false"/> <parameter key="grouping_character" value=","/> <parameter key="infinity_representation" value=""/> <parameter key="date_format" value=""/> <parameter key="first_row_as_names" value="true"/> <list key="annotations"/> <parameter key="time_zone" value="SYSTEM"/> <parameter key="locale" value="English (United States)"/> <parameter key="encoding" value="windows-1252"/> <parameter key="read_all_values_as_polynominal" value="false"/> <list key="data_set_meta_data_information"> <parameter key="0" value="x1.true.real.attribute"/> <parameter key="1" value="y1.true.real.attribute"/> <parameter key="2" value="z1.true.integer.attribute"/> <parameter key="3" value="x2.true.real.attribute"/> <parameter key="4" value="y2.true.real.attribute"/> <parameter key="5" value="z2.true.integer.attribute"/> </list> <parameter key="read_not_matching_values_as_missings" value="false"/> <parameter key="datamanagement" value="double_array"/> <parameter key="data_management" value="auto"/> </operator> <operator activated="true" class="multiply" compatibility="9.6.000" expanded="true" height="103" name="Multiply" width="90" x="313" y="34"/> <operator activated="true" class="select_attributes" compatibility="9.6.000" expanded="true" height="82" name="Select Attributes (2)" width="90" x="447" y="136"> <parameter key="attribute_filter_type" value="subset"/> <parameter key="attribute" value=""/> <parameter key="attributes" value="x2|y2|z2"/> <parameter key="use_except_expression" value="false"/> <parameter key="value_type" value="attribute_value"/> <parameter key="use_value_type_exception" value="false"/> <parameter key="except_value_type" value="time"/> <parameter key="block_type" value="attribute_block"/> <parameter key="use_block_type_exception" value="false"/> <parameter key="except_block_type" value="value_matrix_row_start"/> <parameter key="invert_selection" value="false"/> <parameter key="include_special_attributes" value="false"/> </operator> <operator activated="true" class="rename" compatibility="9.6.000" expanded="true" height="82" name="Rename (2)" width="90" x="581" y="136"> <parameter key="old_name" value="x2"/> <parameter key="new_name" value="x"/> <list key="rename_additional_attributes"> <parameter key="y2" value="y"/> <parameter key="z2" value="z"/> </list> </operator> <operator activated="true" class="generate_attributes" compatibility="9.6.000" expanded="true" height="82" name="Generate Attributes (2)" width="90" x="715" y="136"> <list key="function_descriptions"> <parameter key="Series" value=""Series2""/> </list> <parameter key="keep_all" value="true"/> </operator> <operator activated="true" class="select_attributes" compatibility="9.6.000" expanded="true" height="82" name="Select Attributes" width="90" x="447" y="34"> <parameter key="attribute_filter_type" value="subset"/> <parameter key="attribute" value=""/> <parameter key="attributes" value="x1|y1|z1"/> <parameter key="use_except_expression" value="false"/> <parameter key="value_type" value="attribute_value"/> <parameter key="use_value_type_exception" value="false"/> <parameter key="except_value_type" value="time"/> <parameter key="block_type" value="attribute_block"/> <parameter key="use_block_type_exception" value="false"/> <parameter key="except_block_type" value="value_matrix_row_start"/> <parameter key="invert_selection" value="false"/> <parameter key="include_special_attributes" value="false"/> </operator> <operator activated="true" class="rename" compatibility="9.6.000" expanded="true" height="82" name="Rename" width="90" x="581" y="34"> <parameter key="old_name" value="x1"/> <parameter key="new_name" value="x"/> <list key="rename_additional_attributes"> <parameter key="y1" value="y"/> <parameter key="z1" value="z"/> </list> </operator> <operator activated="true" class="generate_attributes" compatibility="9.6.000" expanded="true" height="82" name="Generate Attributes" width="90" x="715" y="34"> <list key="function_descriptions"> <parameter key="Series" value=""Series1""/> </list> <parameter key="keep_all" value="true"/> </operator> <operator activated="true" class="append" compatibility="9.6.000" expanded="true" height="103" name="Append" width="90" x="916" y="34"> <parameter key="datamanagement" value="double_array"/> <parameter key="data_management" value="auto"/> <parameter key="merge_type" value="all"/> </operator> <connect from_op="Read CSV" from_port="output" to_op="Multiply" to_port="input"/> <connect from_op="Multiply" from_port="output 1" to_op="Select Attributes" to_port="example set input"/> <connect from_op="Multiply" from_port="output 2" to_op="Select Attributes (2)" to_port="example set input"/> <connect from_op="Select Attributes (2)" from_port="example set output" to_op="Rename (2)" to_port="example set input"/> <connect from_op="Rename (2)" from_port="example set output" to_op="Generate Attributes (2)" to_port="example set input"/> <connect from_op="Generate Attributes (2)" from_port="example set output" to_op="Append" to_port="example set 2"/> <connect from_op="Select Attributes" from_port="example set output" to_op="Rename" to_port="example set input"/> <connect from_op="Rename" from_port="example set output" to_op="Generate Attributes" to_port="example set input"/> <connect from_op="Generate Attributes" from_port="example set output" to_op="Append" to_port="example set 1"/> <connect from_op="Append" from_port="merged set" to_port="result 1"/> <portSpacing port="source_input 1" spacing="0"/> <portSpacing port="sink_result 1" spacing="0"/> <portSpacing port="sink_result 2" spacing="0"/> </process> </operator> </process>
5 -
Hi @hbajpai
Thx ! Now i've got the plot look like this
But i have another issue, how do i set the series style like this (marker enabled -> false):
In other words, how do I set the style so that the line style becomes like this
0 -
Hey @will_w7tl9,
I do not think Rapid Miner has a 3D line plot yet. So, you can only 3D plot scatter plots.0 -
finally i got it ...(by edit the source code)
1