I’ve seen prior posts on this with people indicating that there is no option for adjusting the values. Somehow I’ve got them at two different sizes, but I cannot find anything I’ve done differently. Does anybody have any guidance, since I literally cannot read the axis labels in the plot on the right?
Page 1 / 1
Hi Dan,
The reason the right Universal Plot’s text looks smaller is because of the y-axis dependent variable. You directly chose NSRA and filled in the values in the settings for the Universal Plot. If you want the labels to be more visible, I would suggest placing the NSRA directly in the MFE and then use the Line drop down to select NSRA. This way, things like Surface, Src, Data, etc are not printed on the y-axis.
@MichaelH This is an annoying feature and could probably benefit from a formatting update.
Why is it necessary to print all of the settings on the Y axis? Could they go into the lower box in the frame? Most analysis windows have details printed there.
Why does the font size of both axis values need to decrease with the y axis label? It’s the numbers on the axis that are the most valuable to see at a glance. When copying and pasting into another document, it can be unreadable sometimes.
I think this has been discussed in the past, but why should we need to export raw data to other programs just to generate readable graphics?
Michael,
So here’s my problem. I’m working in a multi-configuration situation, and if I have to implement the calculation in the merit function, then there is a *ton* of other calculations that also get performed, just to produce my plot. For god’s sake, is there any other piece of software that produces graphs, but doesn’t let you decide how to name the axis?!?
Hey Dan,
The Universal Plot itself is a very simple tool that was primarily designed for investigative purposes and to fill in some of the gaps of the built-in analysis. Since OpticStudio itself isn’t a plotting or graphing program, I fear that the built-in graphing options will never be as good as a dedicated graphing software.
Since you mentioned the complexity of your system with “multi-configuration” and “a *ton* of other calculations”, I think using the ZOS-API is the best option. This allows you to extract the data from OpticStudio and then you can leverage dedicated graphing packages to format the look & feel of your graphs to your needs. Below is a simple example of scanning through the TiltAboutX for an object and extracting a Merit Function Operand value.
X_START = -6 X_END = 6 NUMBER_OF_STEPS = 50
xary = [] yary = [] for i in range(NUMBER_OF_STEPS): # store the x-value xary.append(X_START + i * (X_END - X_START) / (NUMBER_OF_STEPS - 1))
# modify the independent variable TheSystem.NCE.GetObjectAt(2).TiltAboutX = xary[-1] print(f'modified o2 tilt : {xary[-1]}') # update the merit function TheSystem.MFE.CalculateMeritFunction()
# retrieve the dependent variable yary.append(TheSystem.MFE.GetOperandAt(92).Value) # use the following if you just want a single MFO without creating a merit function # yary.append(TheSystem.MFE.GetOperandValue(ZOSAPI.Editors.MFE.MeritOperandColumn.NSRA, 1, 24, 0, 0, 1, 17, 0, 0))
# plot the data plt.plot(xary, yary) plt.show()
Thank you Michael,
It appears that I *am* able to manually change the title on a the plot, by right clicking, selecting axis options, and changing from automatic labeling to something shorter. This meets my needs, at least for now. Posting this in case it is helpful for anybody else.