Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

displaying plots from two models in one window

Please login with a confirmed email address before reporting spam

I have two similar models but with different input and I was trying to plot grepahs from this diffrent models in one window. Anybody know how to merge the results of two models in one graph. I was trying to send both models to a script, but it opens for me two different scripts and I canàt merge the two plots togetehr.am using comsol 3.5.

best regards

13 Replies Last Post 23 giu 2016, 08:43 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 27 mag 2010, 11:07 GMT-4
You can load comsol files with script. What you can do is to load both files in the script and assign 2 different variables to the extracted fem structure. Then use matlab functions to extract the data (posteval,... ) and plot both in a subplot.
You can load comsol files with script. What you can do is to load both files in the script and assign 2 different variables to the extracted fem structure. Then use matlab functions to extract the data (posteval,... ) and plot both in a subplot.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 27 mag 2010, 11:35 GMT-4
Dear Danial Tz
thank you for your replay. So you are suggeting me to use MATLAB? is there an option with out using matlab, doing it the whole thing on comsol script?
Dear Danial Tz thank you for your replay. So you are suggeting me to use MATLAB? is there an option with out using matlab, doing it the whole thing on comsol script?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 27 mag 2010, 11:45 GMT-4
With Comsol 3.5a you don't have such an option. With Comsol 4 you can get more or less something like you want. I can not say much as I have not used Comsol 4 to the fullest.
With Comsol 3.5a you don't have such an option. With Comsol 4 you can get more or less something like you want. I can not say much as I have not used Comsol 4 to the fullest.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 27 mag 2010, 11:46 GMT-4
Thax a lot again.
Thax a lot again.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 mag 2010, 08:44 GMT-4
Well I just plotted one graph from a model. Then opened another model, keeping the "figure 1" window open. Then on the general page of the plot parameters selected Plot in: figure 1 (instead of new figure) and checked the box: "keep current plot" and I got the other graph on the same figure.
Any help?
Well I just plotted one graph from a model. Then opened another model, keeping the "figure 1" window open. Then on the general page of the plot parameters selected Plot in: figure 1 (instead of new figure) and checked the box: "keep current plot" and I got the other graph on the same figure. Any help?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 mag 2010, 09:04 GMT-4
Dear Jaana Kujala

thank you for the suggestion. But when I open a new model( the second model) I don't have the option in figure 1. when a new model open it will assume as is figure 1 from the other model doesn't exist. May be the version of comsol am using, version 3.5a. Anything ?
Dear Jaana Kujala thank you for the suggestion. But when I open a new model( the second model) I don't have the option in figure 1. when a new model open it will assume as is figure 1 from the other model doesn't exist. May be the version of comsol am using, version 3.5a. Anything ?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 mag 2010, 09:18 GMT-4
I have the same version (3.5a) and I did have the option to plot in "figure 1". Did you open the second model to another window or to the same one from which you plotted the first graph? For me it worked only when using the same one.
I have the same version (3.5a) and I did have the option to plot in "figure 1". Did you open the second model to another window or to the same one from which you plotted the first graph? For me it worked only when using the same one.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 mag 2010, 10:36 GMT-4
Dear Jaana Kujala

thank you very much. I didn't get the trick in your first message. Now it is working for me.
thank you very much again.
Dear Jaana Kujala thank you very much. I didn't get the trick in your first message. Now it is working for me. thank you very much again.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 set 2012, 12:06 GMT-4
Hi,

Do you know how to do the same trick in v4.3? I want to combine some line graphs from two different models.
thanks
Hi, Do you know how to do the same trick in v4.3? I want to combine some line graphs from two different models. thanks

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 gen 2014, 11:32 GMT-5
Thanks. I just combined 6 plots successfully.
Thanks. I just combined 6 plots successfully.

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 27 gen 2015, 16:37 GMT-5
Hi
I am trying to plot two graphs from models in one window? any one who has experience in this please help.

Arshad
Hi I am trying to plot two graphs from models in one window? any one who has experience in this please help. Arshad

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 22 giu 2016, 10:31 GMT-4

Dear Jaana,
Thank you very much for your support. I opened both plots in the same window but can't put them together as I can't find the "keep current plot" checkbox.
Please note that I am using comsol 5.2

when I choose plot in "Plot 1" it just goes to plot 1's tab

is there anything you can help me with?

Thank you in advance!
Dear Jaana, Thank you very much for your support. I opened both plots in the same window but can't put them together as I can't find the "keep current plot" checkbox. Please note that I am using comsol 5.2 when I choose plot in "Plot 1" it just goes to plot 1's tab is there anything you can help me with? Thank you in advance!

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 23 giu 2016, 08:43 GMT-4
Hi,

In COMSOL 5.2 (and the current version, 5.2a, as well as earlier versions), there are more powerful concepts: model components, data sets, and plot groups. To display two or more plots in the same graphics window, add those plots as subnodes to a Plot Group node under Results. Each plot in a plot group can refer to a separate data set, and you can have several Solution data sets active, each pointing to a separate Component with its own geometry and physics. That way, you can combine and overlay plots in a flexible way.

Best regards,
Magnus Ringh, COMSOL

Hi, In COMSOL 5.2 (and the current version, 5.2a, as well as earlier versions), there are more powerful concepts: model components, data sets, and plot groups. To display two or more plots in the same graphics window, add those plots as subnodes to a Plot Group node under Results. Each plot in a plot group can refer to a separate data set, and you can have several Solution data sets active, each pointing to a separate Component with its own geometry and physics. That way, you can combine and overlay plots in a flexible way. Best regards, Magnus Ringh, COMSOL

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.