Great new features for Visualizer: color,style,width and markers etc

In the recent release of new 2019b version (R2 and above), Visualizer features have been extensively enhanced:
image

Now users can do the following changes
Line color (blue, green,red, Magenta etc)
Line style (-, --, :,-., etc)
Line width
Markers (x,o,+,s,d)
Marker size
X axis location (top, bottom)
Y axis location (left, right)

newLinePlotOptions !

for real and imaginary data, by default they have the same color.
image
if you plot real and imaginary separately, they will have the same Y axis, and you can change the line style or others:
image

displayRealAndImag

A note about the automatic color: Only when a data set has two or more attributes, then the automatic colors apply, such as the source fields: the “fields” dataset has E and H,
image
image

However, the component of an attribute, such as “E” dataset from a DFT monitor, its Ex,Ey and Ez cannot be automatically shown in different colors.

The following script creates a matrix dataset with three attributes: R,T, and A=1-R-T:
R=transmission(“R”);

T=-transmission(“T”);

A=1-R-T;

f=getdata(“R”,“f”);

RTA=matrixdataset(“RTA”);

RTA.addparameter(“f”,f,“lambda”,c/f);

RTA.addattribute(“R”,R);

RTA.addattribute(“T”,T);

RTA.addattribute(“A”,A);

visualize(RTA);
image

You can edit the visualizer to show the legends:
image

Similarly, the scattering, absorption and extinction cross-sections can be set in one dataset and then it can show them in different color.

A similar Chinese post is here Visualizer 最新功能: 可改颜色、线形、线宽、标记等

2 Likes

These new features for lines looks great! But I still have many problems with the visualizer when displaying E field distribution, etc, especially with respect to the color bar.

In the very old version (2018a I remember), the colorbar was narrow with all integral values. See below, although it could only be saved as *.jpg with poor quality, which still looked pretty good.
FDTD2018

However in the later version, the colorbar became somehow wider, and the colorbar ticks were replaced without clear thresholds, and also no more integral values.

I thought the latest release will solve the problem. However, the colorbar became even more strange. I have no idea why the bar are so wide, and I tried hard but cannot set integral ticks.

I miss the original colorbar style, honestly:(