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

KrystianP
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.

Answers

  • Chamailidis
    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

  • KrystianP
    KrystianP Altair Community Member

    Hallo Chamailidis,

    Unfortunately the results is the same.

    Wrong_scale.png

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.