How to spin the colormap in 2 different circles in matlab

In summary, to create two circles with different colormaps in MATLAB, you can use the "colormap" function to set the colormap for each circle. This can be achieved by specifying the colormap as a matrix of RGB values or using one of MATLAB's built-in colormaps. You can also change the direction of the colormap in each circle using the "caxis" function, and rotate the colormap using the "rotate" function. Additionally, it is possible to use different colormaps for each individual data point in the circles by creating a custom colormap and using the "surf" or "scatter" function. Finally, to save the plot of the two circles with different colormaps, you can use the "saveas"
  • #1
ThunderLight
27
2
Hi,

I'm trying to rotate 2 different plotted circles in matlab, which have the Jet colourmap.
Colormap has the Spinmap function, but when I use it, it only spins the Jet colormap in 1 circle, leaving out the other.

I would like to spin the Jet colormap in2 different circles in opposite directions, and not have the angle view changed from what I originally had. The Spinmap function seems to change the angle, and occupy the entire screen.

Is there any other way?
 
Physics news on Phys.org
  • #2
Have you tried using circshift() on the colormap?
 

1. How do I create two circles in MATLAB with different colormaps?

To create two circles with different colormaps in MATLAB, you can use the "colormap" function. First, create two circles using the "rectangle" or "circle" function. Then, use the "colormap" function to set the colormap for each circle. You can specify the colormap as a matrix of RGB values or as one of MATLAB's built-in colormaps.

2. Can I change the direction of the colormap in each circle?

Yes, you can change the direction of the colormap in each circle by using the "caxis" function. This function allows you to specify the minimum and maximum values for the colormap, as well as the direction (either "normal" or "reverse"). By adjusting the caxis values for each circle, you can achieve different directions for the colormap.

3. How do I rotate the colormap in each circle?

To rotate the colormap in each circle, you can use the "rotate" function. This function allows you to specify the angle of rotation and the center of rotation. By applying the rotate function to each circle, you can achieve a rotational effect on the colormap.

4. Is it possible to use different colormaps for each individual data point in the circles?

Yes, it is possible to use different colormaps for each individual data point in the circles. You can achieve this by creating a custom colormap using the "colormap" function and assigning different colors to each data point. Then, use the "surf" or "scatter" function to plot the circles with the custom colormap.

5. How can I save the plot of the two circles with different colormaps?

To save the plot of the two circles with different colormaps, you can use the "saveas" function. This function allows you to save the plot as an image file, such as a PNG or JPEG. You can also specify the resolution and other settings for the saved image.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
942
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
752
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
Back
Top