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.

How to scale one axis of a 2D plot?

Please login with a confirmed email address before reporting spam

Hello,

I have model regions which are very thin and long and have strong complex gradients along the shorter side.

How can I scale one of the two axes of a 2D plot (see illustrations attached)?

Opposite to a 1D plot (a curve y = f(x)), where any axis can be easily squized or expanded, the axes of a 2D plot (for example, field as a function of (x,y)) are always shown in the actual scale, equal for both axes. I have tried slices of 3D plots, 2D plots on various options of "Datasets", etc., but none of them worked in the way I want.

It would be very strange if COMSOL cannot do such a simple thing. Now I have to export and plot in an external software every single field distribution just to be able to see the solution result.



4 Replies Last Post 15 oct. 2020, 07:32 UTC−4
Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 15 oct. 2020, 02:07 UTC−4

You can change view scaling: In the 2D plot group, there's a View list. Click on the Go to Source button to the right of the list. This takes you to the view that's used. Select the view's Axis subnode. It has a View scale setting, which defaults to None. Set View scale=Manual and enter the scale factors that you want to use.

You can change view scaling: In the 2D plot group, there's a View list. Click on the Go to Source button to the right of the list. This takes you to the view that's used. Select the view's Axis subnode. It has a View scale setting, which defaults to None. Set View scale=Manual and enter the scale factors that you want to use.

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 15 oct. 2020, 03:20 UTC−4

You can change view scaling: In the 2D plot group, there's a View list. Click on the Go to Source button to the right of the list. This takes you to the view that's used. Select the view's Axis subnode. It has a View scale setting, which defaults to None. Set View scale=Manual and enter the scale factors that you want to use.

It works, thank you! Do you know if anything similar is possible in 3D?

>You can change view scaling: In the 2D plot group, there's a View list. Click on the Go to Source button to the right of the list. This takes you to the view that's used. Select the view's Axis subnode. It has a View scale setting, which defaults to None. Set View scale=Manual and enter the scale factors that you want to use. It works, thank you! Do you know if anything similar is possible in 3D?

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 15 oct. 2020, 03:23 UTC−4

It works, thank you! Do you know if anything similar is possible in 3D?

Yes, in 3D you can achieve the same effect in the View > Camera node, which contains the same View scale options.

>It works, thank you! Do you know if anything similar is possible in 3D? Yes, in 3D you can achieve the same effect in the View > Camera node, which contains the same View scale options.

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 15 oct. 2020, 07:32 UTC−4

Great, thanks!

Great, thanks!

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.