Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Comsol Livelink for Matlab, property for Line markers of 1D point graph

Please login with a confirmed email address before reporting spam

Dear All, I have a question that could be straight forward but I can not find its solution. I appreciate your help. I am using Comsol Livelink for Matlab to program a comsol .mph file. everything works fine and now I am progrmamming the graphs and plots in the results. I simply want to change the property of a 1D point graph (Line markers), the vlaues I need to change are as follows: Line MArkers, Marker=Point, Positioning=In data points.

I fail to do it, I managed successfully to change the Line style from Solid to None. and it works using command: ptgr1.set('linestyle','none'); but when I try to do something similar with line markers instead of line style using commands: ptgr1.set('linemarkers','+'); ptgr1.set('positioning','In data points');

, it gives me an error: Unknown property.

- Property: linemarkers

I want to know what is the name of the property to change the line marker type and positioning. I attach a screenshot fo the properites I need to find their corresponding commands. Thanks a lot. I can also find that the documnetation of the Comsol Livelink with Matlab does not contain the full set of commands (for example, I did not find the commands that match with the aforementioned problem). I would appreciate if you can help me find the full list of commands (instead of the sample commands in the livelink documentaiton.)

Thanks a lot for oyur assistance. Best Regards, Hossam



2 Replies Last Post 27 nov. 2018, 09:10 UTC−5
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 27 nov. 2018, 06:50 UTC−5

Hi

For linemarkers the following values are valid: none, cycle, cyclereset, asterisk, circle, diamond, plus, point, square, star, triangle

Allow me to tell me how to figure that out. Open mphnavigator and locate your 1D plot. Scroll down in the Properties table until you find the linemarker row. You can now see its current value and the allowed values. Since the number of allowed values is large the best way to see the whole list of allowed values is to select them and click copy. Then you can paste the values into an editor (like I did above).

In order to set the linemarker property you can simply click on the "Copy set" button. That will copy the necessary statement to the clipboard. You can now paste the statment into your editor:

model.result('pg4').feature('ptgr1').set('linemarker', 'none');

and change the value from 'none' to 'plus'.

And now to the bad news: Markers are always placed on data points in Matlab plots.

-------------------
Lars Gregersen
Comsol Denmark
Hi For linemarkers the following values are valid: none, cycle, cyclereset, asterisk, circle, diamond, plus, point, square, star, triangle Allow me to tell me how to figure that out. Open mphnavigator and locate your 1D plot. Scroll down in the Properties table until you find the linemarker row. You can now see its current value and the allowed values. Since the number of allowed values is large the best way to see the whole list of allowed values is to select them and click copy. Then you can paste the values into an editor (like I did above). In order to set the linemarker property you can simply click on the "Copy set" button. That will copy the necessary statement to the clipboard. You can now paste the statment into your editor: model.result('pg4').feature('ptgr1').set('linemarker', 'none'); and change the value from 'none' to 'plus'. And now to the bad news: Markers are always placed on data points in Matlab plots.


Please login with a confirmed email address before reporting spam

Posted: 6 years ago 27 nov. 2018, 09:10 UTC−5

Dear Lars, Thank you so much for your prompt and detailed reply. This is eaxactly what I am looking for. This really helped me a lot and solved my problems. you have cleared to me all the confusion I was having.

Thank you so much :)

Hossam

Dear Lars, Thank you so much for your prompt and detailed reply. This is eaxactly what I am looking for. This really helped me a lot and solved my problems. you have cleared to me all the confusion I was having. Thank you so much :) Hossam

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.