ubermag / help

Repository for raising issues and requesting help on Ubermag
BSD 2-Clause "Simplified" License
11 stars 3 forks source link

How to set the colorbar to be based on all directions instead of just the Z component #103

Closed code-whale closed 3 years ago

code-whale commented 3 years ago

101

@marijanbeg, Sorry, I can't reopen the question #101. I can only create a new question. I copy the question as follows: Thank you very much for your help! I used angle, but there was a gap between the picture and what I expected.I used the following code to plotdata.drive(34).step(0).plane(z=1e-9).angle.mpl_scalar(filter_field=data.drive(34).step(0).z,cmap='jet').The picture is shown below. image

I checked the API of discrete field and found that the syntax is applicable to the angle between the plane component and the horizontal axis. However, I hope to draw the same graph as in your article, which can reflect the changes of XYZ in three directions.The component color distribution I want is the color distribution as shown in the figure below. image

Can you tell me how to implement such a graph? Is my colorbar wrong? Thank you again for your patient help!

marijanbeg commented 3 years ago

Hi @code-whale, thank you very much for your patience - Ubermag 0.50 is out and provides this functionality.

Please update Ubermag (conda update ubermag) and have a look at this tutorial: https://github.com/ubermag/workshop/blob/master/tutorials/angle-hls-plot.ipynb

We are still working on adjusting the colorbar, but this is a non-trivial issue.

Please note that there are many new functionalities and (some minor) changes in the interface, so you might want to have a look at other tutorials as well.

If you require any further support, please raise an issue in this repository, and we would be happy to address it.

code-whale commented 3 years ago

@marijanbeg, Thank you very much for your help with all the questions I have raised! Thank you and ubermag team for their efforts! I believe it will become the best micro magnetic software!