Question relating to ResultDefinitionScalar() displaying empty scale and gray model

User: "KrystianP"
Altair Community Member

Hallo Community,

I want to use the ResultDefinitionScalar function to plot displacements. And it plot empty legend and gray model. Maybe somebody have the same issue and already solved it

EmptyLegend.png

When I firstly manually plot some results after that the code works.

elem_collection = hw.hv.Collection(hw.hv.Element, populate=True)
scalar_results = hw.hv.ResultDefinitionScalar(dataType="DISP", dataComponent="Mag", averageMode="none", collection = elem_collection)
results.plot(scalar_results)

Thank you for your responses.

Sort by:
1 - 2 of 21
    User: "Chamailidis"
    Altair Employee

    Hi Krystian, please try these lines of code below and tell me how it went:

    import hw.hv

    elementCollection = hw.hv.Collection(hw.hv.Element, populate=True)

    scalarResults = hw.hv.ResultDefinitionScalar(dataType="Displacement", dataComponent="Mag", averageMode="none", collection = elementCollection)

    scalarResults.display()

    The only problem I see is the dataType argument

    User: "KrystianP"
    Altair Community Member
    OP

    Hallo Chamailidis,

    Unfortunately the results is the same.

    Wrong_scale.png