Edit Legend in HyperView

Rahul_P1
Rahul_P1
Altair Employee
edited October 2020 in Community Q&A

Hi guys,

I have two pretty much basic questions.

1) How to edit colour in the legend? Not the colour of the plot but how to change for example the colour of the values in the legend from white to black?

2) When you plot Displacement as Mag, what does actually Mag mean? How is it calculated? Does it take into account the sign +/-? I went through Student guide but could not find the answer.

Thank you for any reply.

Tagged:

Answers

  • Rahul_P1
    Rahul_P1
    Altair Employee
    edited September 2014

    Ziga,

    To change the colour of the text in the legend (as this is foreground text) just go to preferences > options > appearance and choose the required foreground colour, alternatively you can also make the legend background transparent and opaque using the edit legend button in the contour panel and change the fill colour of this for better visibility as well.

    The magnitude has the usual meaning that magnitude has with vectors, the square root of the squares of the magnitudes of individual components, the negative sign does not matter. This is easily verified, let us know if your results don`t agree with this

    uwl3h-Capture.JPG

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2014

    Hi,

    For each Hyperview session, I have to set (see screenshot) :

    • Numeric format = Fixed
    • Numeric precision = 3
    • Number of level = 20

    Howto set them automatically for all Hyperview session ?

     

    Thanks,

     

    <?xml version="1.0" encoding="UTF-8"?>post-889-0-19452300-1410196611_thumb.png

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2014

    Hi Q.NGUYEN-DAI,

     

    Please follow the below steps:

     

    first save your legend preferences to a tcl format in working directory. 
     
    >Copy the preferences.mvw file from the <install location>Altair\12.0\hw\preferences.mvw to the working directory.
    >Add the below commands  to the preference file at the end of the file.
     
    *BeginDefaults()
        *BeginGraphicDefaults()
         *DefaultPostContourLegendFile ('Full path to the legend file exported as tcl” (patran-legended1.tcl)) with using back slash ( / )
        *EndGraphicDefaults()
    *EndDefaults()
     
    >Go to File pull down in HVàLoadàPreference fileàselect register and select the preference file from the working directory for which changes were madeàload the preference file.
     
    >This would have the data of the legend file so each time HV session is opened the custom legend is used.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2014

    Thank you !

  • AlexanderP
    AlexanderP Altair Community Member
    edited April 2019

    Hi all
    How to change legend using only .tcl scripts?

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited April 2019

    Hi Alexander,

     

    The easiest way would be to save the Legend file as tcl using Edit Legend Option. 

     

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.cab856e99cbc6f4e90851ba6b2f6ed3d.png

     

     

    then source the file and pass legend handle:

     

     ::post::LoadSettings $legendHandle

    ::post::Draw 

     

    You can open and see the tcl file and customize accordingly.