• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. how to change the axis name with assembler expressions

Stats

  • Replies 1
  • Subscribers 128
  • Views 93
  • Members are here 0

how to change the axis name with assembler expressions

Mooh
Mooh 2 days ago

For example, I have this signal s22, and I want to change the X axis to be named NF and the Y axis  to be Freq_of_blocker

I tried this, but it didn't work

  • Cancel
  • Sign in to reply
Parents
  • Andrew Beckett
    Andrew Beckett 10 hours ago

    This approach won't work as the expectation is that the function returns a number or a waveform; if you had done a sweep (and this had worked) then you could have ended up with lots of separate plots - also, the expression evaluation in the background would fail and it wouldn't know whether this is a waveform or a scalar.

    The code below can be used to give you a calculator function that allows you to update the x and/or y axis names. Not sure that plotting the y axis name as "NF" (Noise Figure) makes sense when it's s22, but presumably it makes sense to you!

    /* abSetAxisNames.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Feb 15, 2026 
    Modified   
    By         
    
    Set either the x-axis name, the y-axis name, or both for a signal.
    
    abSetAxisNames(VT("/out") ?xname "something" ?yname "else")
    
    Both keyword arguments are optional; if omitted, that axis name is
    unchanged.
    
    To use in the calculator (from IC617) use the fx button in the Function
    Panel or the + button in the Expression Build to register the function.
    
    ***************************************************
    
    SCCS Info: @(#) abSetAxisNames.il 02/15/26.10:30:02 1.1
    
    */
    
    /***************************************************************
    *                                                              *
    *   (abSetAxisNames wave [?xname "new x"] [?yname "new y"])    *
    *                                                              *
    *    Update the x-axis name (label) and/or the y-axis name.    *
    *                                                              *
    ***************************************************************/
    
    (defun abSetAxisNames (wave @key xname yname)
      (when (symbolp xname)
        (setq xname (symbolToString xname)))
      (when (symbolp yname)
        (setq yname (symbolToString yname)))
      (cond 
        ((drIsWaveform wave)
         (when xname
           (putpropq (drGetWaveformXVec wave) xname name))
         (when yname
           (putpropq (drGetWaveformYVec wave) yname name))
         wave
         )
        ((famIsFamily wave)
         (famMap 'abSetAxisNames wave ?xname xname ?yname yname)
         )
        (t wave)
        )
      )
    
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;; GUI builder information ;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ocnmRegGUIBuilder(
     '(nil
      function abSetAxisNames
      name abSetAxisNames
      description "abSetAxisNames"
      category ("Custom Functions")
      analysis (nil
          general (nil
            args (wave xname yname )
              signals (nil
                    wave (nil
                          prompt "wave"
                          tooltip "wave"
                          )
               )
              params(nil
                     xname (nil
                           prompt "X Name"
                           tooltip "X Axis Name"
                           guiRowHint 1
                           type string
                           required nil
                           keyed t
                     )
                     yname (nil
                           prompt "Y Name"
                           tooltip "Y Axis Name"
                           guiRowHint 1
                           type string
                           required nil
                           keyed t
                     )
              )
            inputrange t
          )
      )
      outputs(result)
     )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett 10 hours ago

    This approach won't work as the expectation is that the function returns a number or a waveform; if you had done a sweep (and this had worked) then you could have ended up with lots of separate plots - also, the expression evaluation in the background would fail and it wouldn't know whether this is a waveform or a scalar.

    The code below can be used to give you a calculator function that allows you to update the x and/or y axis names. Not sure that plotting the y axis name as "NF" (Noise Figure) makes sense when it's s22, but presumably it makes sense to you!

    /* abSetAxisNames.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Feb 15, 2026 
    Modified   
    By         
    
    Set either the x-axis name, the y-axis name, or both for a signal.
    
    abSetAxisNames(VT("/out") ?xname "something" ?yname "else")
    
    Both keyword arguments are optional; if omitted, that axis name is
    unchanged.
    
    To use in the calculator (from IC617) use the fx button in the Function
    Panel or the + button in the Expression Build to register the function.
    
    ***************************************************
    
    SCCS Info: @(#) abSetAxisNames.il 02/15/26.10:30:02 1.1
    
    */
    
    /***************************************************************
    *                                                              *
    *   (abSetAxisNames wave [?xname "new x"] [?yname "new y"])    *
    *                                                              *
    *    Update the x-axis name (label) and/or the y-axis name.    *
    *                                                              *
    ***************************************************************/
    
    (defun abSetAxisNames (wave @key xname yname)
      (when (symbolp xname)
        (setq xname (symbolToString xname)))
      (when (symbolp yname)
        (setq yname (symbolToString yname)))
      (cond 
        ((drIsWaveform wave)
         (when xname
           (putpropq (drGetWaveformXVec wave) xname name))
         (when yname
           (putpropq (drGetWaveformYVec wave) yname name))
         wave
         )
        ((famIsFamily wave)
         (famMap 'abSetAxisNames wave ?xname xname ?yname yname)
         )
        (t wave)
        )
      )
    
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;; GUI builder information ;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ocnmRegGUIBuilder(
     '(nil
      function abSetAxisNames
      name abSetAxisNames
      description "abSetAxisNames"
      category ("Custom Functions")
      analysis (nil
          general (nil
            args (wave xname yname )
              signals (nil
                    wave (nil
                          prompt "wave"
                          tooltip "wave"
                          )
               )
              params(nil
                     xname (nil
                           prompt "X Name"
                           tooltip "X Axis Name"
                           guiRowHint 1
                           type string
                           required nil
                           keyed t
                     )
                     yname (nil
                           prompt "Y Name"
                           tooltip "Y Axis Name"
                           guiRowHint 1
                           type string
                           required nil
                           keyed t
                     )
              )
            inputrange t
          )
      )
      outputs(result)
     )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information