Question: I have 3 Nx1 arrays, say X,Y,Z. I'd like to create a 3D plot such that each of the arrays I can assign different colours to improve the visibility of points. My main objective now is to change only the colour of array Z, such that elements of array X and Y have different colours as that of elements of Z .

I tried `scatter3` function and `gscatter` MATLAB functions, but not able to achieve what I desire.

[![desired 3D plot](https://i.stack.imgur.com/1Vtmb.jpg)](https://i.stack.imgur.com/1Vtmb.jpg)

If we see the Vertical axis in image (Z axis), the colour of points is varying from Blue to Orange/Yellow. I want to set the colour of all these Z points as Red. Rest, all the colours of X and Y points remain same

Answer: 
As far as folders go, you can have as many source folders as you want. Just go to Project Structure -> Modules -> Your Module, click on the Sources Tab, select the folder you want to be Source and click the "Mark as: Sources" button. 
The problem you're facing I'm guessing that's you have the same classes from two different versions of the same module. Basically you have class "a.b.Class1" from chapter 1 and "a.b.Class1" from chapter 2. In this case you are gonna have problems because two classes can't have the same package and name. To solve this issue you could just refactor each folder moving all the classes inside to a distinctive package for that source folder. for instance, in the example where you have class "a.b.Class1" in src1 and src2, you can move all classes in src1 to a package that starts with chapter1 for instance, and you'll get "chapter1.a.b.Class1". Respectively, for src2, you can move all classes to a package that starts with chapter2, and you'll get "chapter2.a.b.Class1". This way you won't have any conflicts.
The source directory represents a single module, if you want multiple modules in a single project, each one has its own src directory.