# How to change the label of independent variables in CMSCOPE

**URL:** <https://scilab.discourse.group/t/how-to-change-the-label-of-independent-variables-in-cmscope/955>\
**Category:** Xcos\
**Created:** [May 26, 2025, 2:16pm UTC](https://scilab.discourse.group/t/how-to-change-the-label-of-independent-variables-in-cmscope/955 "2025-05-26T14:16:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![davcheze](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@davcheze](https://scilab.discourse.group/u/davcheze)\
**Post date:** [May 26, 2025, 2:16pm UTC](https://scilab.discourse.group/t/how-to-change-the-label-of-independent-variables-in-cmscope/955/1 "2025-05-26T14:16:51Z")

</div>

Hello all,

I’m wondering how to customize the labels of independent variables in CMSCOPE to reflect actual value type. For instance in the case of `cmscope` example from the documentation below

 ![image](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/35f31e3f8b9ac209643583c4ee2c9ea7f0f518e9.png)  
how to change `Y` for the 3 subplots ?  
Thank you,

David

---

<div class="post-metadata">

**Author:** ![mottelet](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/mottelet/32/13_2.png) [@mottelet](https://scilab.discourse.group/u/mottelet)\
**Post date:** [May 26, 2025, 4:28pm UTC](https://scilab.discourse.group/t/how-to-change-the-label-of-independent-variables-in-cmscope/955/2 "2025-05-26T16:28:38Z")

</div>

Hello,

There was a similar question two weeks ago ([Is it possible to add label to CSCOPXY block?](https://scilab.discourse.group/t/is-it-possible-to-add-label-to-cscopxy-block/775/1)). In the topic you will find how to recover the CMSCOPE figure handle. Once you have it you will be able to access the subplot Axes entities and change the labels.

S.

---

<div class="post-metadata">

**Author:** ![davidcl](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/davidcl/32/1029_2.png) [@davidcl](https://scilab.discourse.group/u/davidcl)\
**Post date:** [May 27, 2025, 7:05am UTC](https://scilab.discourse.group/t/how-to-change-the-label-of-independent-variables-in-cmscope/955/3 "2025-05-27T07:05:58Z")

</div>

There is no UI-only way to edit the labels through the GUI. The escape is to define your own graphic figure and use it with the “Name of the scope” parameter.

Could you post a bug to improve the current situation for the scopes? IMHO better label management can be implemented : something where port labels can be edited in the UI and used in the cmscope simulation function.

---

<div class="post-metadata">

**Author:** ![mottelet](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/mottelet/32/13_2.png) [@mottelet](https://scilab.discourse.group/u/mottelet)\
**Post date:** [May 27, 2025, 7:24am UTC](https://scilab.discourse.group/t/how-to-change-the-label-of-independent-variables-in-cmscope/955/4 "2025-05-27T07:24:39Z")

</div>

Y label could also inherit link legend, e.g.:

 ![Screenshot 2025-05-27 at 09.21.21](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/279f78b53df601b0eecf89185803432cb23f395c.png)  
 ![Screenshot 2025-05-27 at 09.23.51](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/b6565e24c7a50a53df4afedf7edd4159d3df5a7a.jpeg)

However, adding a legend on a link (right click/Format/Edit) seems to fail very often (the dialog box does not open), e.g. for the CMSCOPE exampe, I am unable to add a legend on any of the links entering the scope block, there is a Java error that can be seen on the command line:

```auto
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "com.mxgraph.util.mxPoint.getX()" because "<local8>" is null
	at org.scilab.modules.xcos.graph.XcosDiagram.createCellIdentifier(Unknown Source)
	at org.scilab.modules.xcos.graph.XcosDiagram.getOrCreateCellIdentifier(Unknown Source)
	at org.scilab.modules.xcos.actions.EditFormatAction.createDialog(Unknown Source)
	at org.scilab.modules.xcos.actions.EditFormatAction.showDialog(Unknown Source)
	at org.scilab.modules.xcos.actions.EditFormatAction.actionPerformed(Unknown Source)
...

```

S.

---

<div class="post-metadata">

**Author:** ![davcheze](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@davcheze](https://scilab.discourse.group/u/davcheze)\
**Post date:** [May 27, 2025, 7:58am UTC](https://scilab.discourse.group/t/how-to-change-the-label-of-independent-variables-in-cmscope/955/5 "2025-05-27T07:58:09Z")

</div>

I experienced similar behaviour as Stephane reported above, Scilab 2025.0.0 WIN10-64 , I was even not able at all to edit the link between current or voltage measurement modelica blocks and the CMSCOPE block.

David

---

<div class="post-metadata">

**Author:** ![mottelet](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/mottelet/32/13_2.png) [@mottelet](https://scilab.discourse.group/u/mottelet)\
**Post date:** [May 27, 2025, 3:30pm UTC](https://scilab.discourse.group/t/how-to-change-the-label-of-independent-variables-in-cmscope/955/6 "2025-05-27T15:30:34Z")

</div>

I created an issue: [Cannot always add legend for Xcos links (#17439) · Issues · scilab / scilab · GitLab](https://gitlab.com/scilab/scilab/-/issues/17439)

---

<div class="post-metadata">

**Author:** ![davcheze](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@davcheze](https://scilab.discourse.group/u/davcheze)\
**Post date:** [May 28, 2025, 8:48am UTC](https://scilab.discourse.group/t/how-to-change-the-label-of-independent-variables-in-cmscope/955/7 "2025-05-28T08:48:15Z")

</div>

hello, as suggested I just filed an issue [Enabling labelling of independent variables in SCOPE block type (#17440) · Issues · scilab / scilab · GitLab](https://gitlab.com/scilab/scilab/-/issues/17440) .  
thank you

David
