color coding transitions in a stackplot
Posted: Wed Jul 15, 2015 4:28 pm
Is there a way to color code different transitions in a stack plot? I am simulating the spin-1 NV center, and I would like to have the 0to+1 and 0to-1 transitions be different colors. I can use Opt.Transitions to separate the transitions and plot them separately and on top of each other, but I can't find a way to change the color of the stackplots. Does anyone know if this can be done?
this code will plot the transitions separately, but they are both still blue:
Opt.Transitions=[1 2]; %(0)<->(-1)
Opt.Output='separate';
[Field,NV1]=pepper(SysNV,ExpNV,Opt);
Opt2.Transitions=[2 3]; %(0)<->(+1)
Opt2.Output='separate';
[Field2,NV2]=pepper(SysNV,ExpNV,Opt2);
stackplot(Field,NV1)
hold on
stackplot(Field2,NV2)
this code will plot the transitions separately, but they are both still blue:
Opt.Transitions=[1 2]; %(0)<->(-1)
Opt.Output='separate';
[Field,NV1]=pepper(SysNV,ExpNV,Opt);
Opt2.Transitions=[2 3]; %(0)<->(+1)
Opt2.Output='separate';
[Field2,NV2]=pepper(SysNV,ExpNV,Opt2);
stackplot(Field,NV1)
hold on
stackplot(Field2,NV2)