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.

mphplot: multiple legends

Please login with a confirmed email address before reporting spam

At the mphplot voice of the online documentation:
Only one color range bar and one legend bar is supported in a MATLAB figure. When the option plot on server is active, all active color range bar are displayed.

That's very disappointing. I actually have a surface plot and a countour plot in the same figure and I want to see the scales for both.
I don't really understand the second sentence: When the option plot on server is active, all active color range bar are displayed. But activating the plot on server option does not help (maybe I should explore it a bit more, but I don't see what is it doing).

(I actually also have an arrow plot, but I believe there is no legend in comsol for the arrow plots, right?)

1 Reply Last Post Apr 17, 2014, 7:06 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 17, 2014, 7:06 a.m. EDT
I sort of found a way around this. If you start matlab via the server with the graphics option

comsol server matlab -graphics

then you can use the comsol graphic window and see all the legends and colorbars in the plot.
You can then create an export node but then I don't know how to save it.

model.result.export('img1').run

is not creating the desired file. Any suggestions?
I sort of found a way around this. If you start matlab via the server with the graphics option comsol server matlab -graphics then you can use the comsol graphic window and see all the legends and colorbars in the plot. You can then create an export node but then I don't know how to save it. model.result.export('img1').run is not creating the desired file. Any suggestions?

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.