The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Not possible to plot attribute with the id role

robertrobert Member Posts: 14 Contributor II
edited November 2018 in Help
Trying to plot data such that the X axis is the date and the Y axis is the single_price, unfortunately the date cannot be selected.
The date properly appears in the metadata view and data view, but for some reason unknown to me, it does not display in plot view.
It would do no good to plot based on the row number, because I'd need the date. I could work around by duplicating the date field with Generate Attributes.
I tried Series and Scatter to no avail.
Here's the reduced process:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.1.011">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.1.011" expanded="true" name="Process">
    <process expanded="true" height="444" width="1150">
      <operator activated="true" class="generate_sales_data" compatibility="5.1.011" expanded="true" height="60" name="Generate Sales Data" width="90" x="45" y="30"/>
      <operator activated="true" class="set_role" compatibility="5.1.011" expanded="true" height="76" name="Set Role" width="90" x="179" y="30">
        <parameter key="name" value="transaction_id"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" class="set_role" compatibility="5.1.011" expanded="true" height="76" name="Set Role (2)" width="90" x="447" y="30">
        <parameter key="name" value="date"/>
        <parameter key="target_role" value="id"/>
        <list key="set_additional_roles"/>
      </operator>
      <connect from_op="Generate Sales Data" from_port="output" to_op="Set Role" to_port="example set input"/>
      <connect from_op="Set Role" from_port="example set output" to_op="Set Role (2)" to_port="example set input"/>
      <connect from_op="Set Role (2)" from_port="example set output" to_port="result 1"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="162"/>
      <portSpacing port="sink_result 2" spacing="0"/>
    </process>
  </operator>
</process>

Answers

  • [Deleted User][Deleted User] Posts: 0 Newbie
    Hi,

    you simply have to leave the date as regular attribute. Then the plots work fine.

    Best,

    Edin
  • robertrobert Member Posts: 14 Contributor II
    Thank you Edin, this worked; I just generated another attribute for the sole purpose of it being an id variable.
Sign In or Register to comment.