Preparation of figures for papers/thesis?

Topics: 4.3a, figure, graphics, Export

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   12 Replies   Last post: August 28, 2014 2:52pm UTC
Ben Harrison

Ben Harrison

February 11, 2013 5:19am UTC

Preparation of figures for papers/thesis?

If it has been written somewhere, can someone point me to where there is a guide to producing figures from 2D plots?

I am using COMSOL 4.2a, and want to use some surface plots alongside legends of the colour tables used. It is bizarre that COMSOL does not provide vector graphics export. I have tried to generate a decent image using the png export (via the 'snapshot' button -- is there any other way?), but it is horrible.

How I am doing it is:
1. Use highest 'Quality' settings in each component of the plot group that has such a setting (e.g. Surface; Contour)
2. Set export resolution to 1200 DPI
3. Set image dimensions to highest possible (for me it seems 4096 pixels is the upper limit?).
4. First generate a snapshot without any includes (i.e. no title, legend, axes. etc)
5. Then generate a snapshot with the legend included.
6. In GIMP cut and paste and scale as required.

See attached file for example of trying to export a surface plot with two colour legends. The model image part of the figure is tiny, and the legends huge.

If anyone has any tips or a separate set of routines in python/matplotlib or similar already in place I would love to see it!

Attachments:   Ellipses_Isotherms_Legend.png  

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Chris Layman

Chris Layman

February 11, 2013 10:10pm UTC in response to Ben Harrison

Re: Preparation of figures for papers/thesis?

Hi,


Good luck with that, I have the same darn problem. In versions 3.5 and lower COMSOL allowed to export 2D graphics as eps format, then under 4.x they got rid of that, expect for 1D line plots, dumb move on their part. I guess you can plot the figure in Matlab and save as eps there, but that is a pain, not to mention you might want to export geometry as a vector graphics. Who would want png etc files anyway?, having the ability to open your vector graphics in, say, Illustrator is critical for generating publication quality figures, in my opinion at least. I sent this suggestion to the COMSOL help a long time ago.



~C

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ben Harrison

Ben Harrison

February 11, 2013 10:59pm UTC in response to Chris Layman

Re: Preparation of figures for papers/thesis?


I sent this suggestion to the COMSOL help a long time ago.


I guess they don't see it as a priority :(

I'm trying to work out how to do it with gnuplot at the moment. If that fails then maybe python/matplotlib.
If I get anywhere useful I'll post back code.

Ben.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Alexander Kuznetsov

Alexander Kuznetsov

February 12, 2013 5:46pm UTC in response to Ben Harrison

Re: Preparation of figures for papers/thesis?


2. Set export resolution to 1200 DPI
3. Set image dimensions to highest possible (for me it seems 4096 pixels is the upper limit?).


that's ridiculous. Such settings would be good for a billboard, not for a little plot in paper/thesis. Typically I use default settings which produce good quality even when printed on full letter-size page.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Anders Ekerot

Anders Ekerot
COMSOL Employee
Sweden
Moderator

February 13, 2013 2:36pm UTC in response to Ben Harrison

Re: Preparation of figures for papers/thesis?

Hello Ben,

Thank you for your comments and suggestions. In this case I would recommend trying a lower DPI, as this would produce a bigger image (a DPI setting of 1200 and a width of 4096 pixels results in an image just over 3 inches in width). The DPI setting also affects the size of the included extras, a lower DPI setting yields smaller colorbars/legends/etc.

An alternative method that can be useful is to resize the GUI image frame to the desired size before exporting it. In the Image snapshot menu, change the Image size to Current - the image will now be exported using the current size of the Graphics window.

Best regards,
Anders Ekerot
COMSOL

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ben Harrison

Ben Harrison

February 14, 2013 12:35am UTC in response to Anders Ekerot

Re: Preparation of figures for papers/thesis?


Thank you for your comments and suggestions. In this case I would recommend trying a lower DPI, as this would produce a bigger image (a DPI setting of 1200 and a width of 4096 pixels results in an image just over 3 inches in width). The DPI setting also affects the size of the included extras, a lower DPI setting yields smaller colorbars/legends/etc.

Thanks Anders, that helps.


An alternative method that can be useful is to resize the GUI image frame to the desired size before exporting it. In the Image snapshot menu, change the Image size to Current - the image will now be exported using the current size of the Graphics window.

This suggestion leaves little flexibility, but thanks again.

I particularly want to control line thicknesses and colours, shape colour schemes and border thicknesses, perhaps highlight particular isotherms, etc.

Is there really no prospect of vector graphics export?
Or a means to export the data set into vtk (for example) to be able to visualise with a specialist software like Paraview?

Ben.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Anders Ekerot

Anders Ekerot
COMSOL Employee
Sweden
Moderator

February 15, 2013 12:58pm UTC in response to Ben Harrison

Re: Preparation of figures for papers/thesis?


I particularly want to control line thicknesses and colours, shape colour schemes and border thicknesses, perhaps highlight particular isotherms, etc.

Is there really no prospect of vector graphics export?
Or a means to export the data set into vtk (for example) to be able to visualise with a specialist software like Paraview?


Thank you for the update.This was also mentioned previously in the thread by Chris L; a possible way forward is to use COMSOL's LiveLink for MATLAB interface. This setup requires both MATLAB and COMSOL's LiveLink for MATLAB product (www.comsol.eu/products/livelink-matlab/). When working with the LiveLink for MATLAB interface, COMSOL plots are created in standard MATLAB figure windows. This gives us access to MATLAB's plot edit mode to control line thicknesses/colors/etc; MATLAB also supports the saving of 2D plots in EPS format. If you have access to both MATLAB and the LiveLink for MATLAB, this is the option we recommend.

Best regards,
Anders Ekerot

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Chris Layman

Chris Layman

February 15, 2013 10:19pm UTC in response to Anders Ekerot

Re: Preparation of figures for papers/thesis?



I particularly want to control line thicknesses and colours, shape colour schemes and border thicknesses, perhaps highlight particular isotherms, etc.

Is there really no prospect of vector graphics export?
Or a means to export the data set into vtk (for example) to be able to visualise with a specialist software like Paraview?


Thank you for the update.This was also mentioned previously in the thread by Chris L; a possible way forward is to use COMSOL's LiveLink for MATLAB interface. This setup requires both MATLAB and COMSOL's LiveLink for MATLAB product (www.comsol.eu/products/livelink-matlab/). When working with the LiveLink for MATLAB interface, COMSOL plots are created in standard MATLAB figure windows. This gives us access to MATLAB's plot edit mode to control line thicknesses/colors/etc; MATLAB also supports the saving of 2D plots in EPS format. If you have access to both MATLAB and the LiveLink for MATLAB, this is the option we recommend.

Best regards,
Anders Ekerot



So now, basically, options that were once included in the COMSOL base software now require the purchase of additional add ons. Smart move.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Jeff Hiller

Jeff Hiller
COMSOL Employee
USA
Moderator

February 15, 2013 10:44pm UTC in response to Chris Layman

Re: Preparation of figures for papers/thesis?

Hi Chris,
Let's not fail to mention that many things that once required add-ons are now feasible with just the base software. To name but a few: geometry parametrization, mesh parametrization, multi-step solution processes, too many post-processing plot types to list here, comparing solutions obtained with different meshes or different values of a parameter, a host of geometry operations, generating custom reports, importing a mesh, exporting a mesh, using virtual geometry operations, etc...
Jeff

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Chris Layman

Chris Layman

February 16, 2013 1:49am UTC in response to Jeff Hiller

Re: Preparation of figures for papers/thesis?


Hi Chris,
Let's not fail to mention that many things that once required add-ons are now feasible with just the base software. To name but a few: geometry parametrization, mesh parametrization, multi-step solution processes, too many post-processing plot types to list here, comparing solutions obtained with different meshes or different values of a parameter, a host of geometry operations, generating custom reports, importing a mesh, exporting a mesh, using virtual geometry operations, etc...
Jeff


Yes, fair enough. But considering what COMSOL is and how often it is used in research, having the ability to produce standard graphics seems pretty core. Not to mention, the solution suggested by COMSOL themselves requires (expensive) 3rd party software in addition to their own add on. Just to have an eps graphic, when they used to have it standard, it is really frustrating.

~Chris

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

February 17, 2013 2:05pm UTC in response to Chris Layman

Re: Preparation of figures for papers/thesis?

Hi

probably the X houndred or tousand of us with COMSOL manage to live without eps, or use other softeware formats.

Personally I have a longer list on the physics side I hope COMSOL will implement in the future, rahter than a full set of detailed plotting options for 1 particular format. Even if I fully nerstand your frustration, as correctly made plots, with titles and nits are mandatory, not only for "publishing" but also for enginnering reports. Luckily for me, most enginnering contracts are more focusing on the "correct" results, than on the nicest show, so I can get accepted handwritten or added titles, units and other comments, on my graphs, for my publications

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Matthias Flatscher

Matthias Flatscher

July 19, 2014 1:48pm UTC in response to Anders Ekerot

Re: Preparation of figures for papers/thesis?



Thank you for the update.This was also mentioned previously in the thread by Chris L; a possible way forward is to use COMSOL's LiveLink for MATLAB interface. This setup requires both MATLAB and COMSOL's LiveLink for MATLAB product (www.comsol.eu/products/livelink-matlab/). When working with the LiveLink for MATLAB interface, COMSOL plots are created in standard MATLAB figure windows. This gives us access to MATLAB's plot edit mode to control line thicknesses/colors/etc; MATLAB also supports the saving of 2D plots in EPS format. If you have access to both MATLAB and the LiveLink for MATLAB, this is the option we recommend.

Best regards,
Anders Ekerot


Hi guys,

I exported my plots to Matlab, but I'm not able to save the plat as a vector image. The .eps always ends up in a pixel figure. Has someone a clue what I making wrong????

Thx

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Kevin Du Clos

Kevin Du Clos

August 28, 2014 2:52pm UTC in response to Ben Harrison

Re: Preparation of figures for papers/thesis?

Agreed. Vector graphics export is a crucial feature.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines