How to avoid the zig-zag line in Dymola? - modelica

When connecting lines in Dymola, how could I avoid the zig-zag line, is there any option that allows me to smooth the connection?

Right-clicking on the connection, an selecting "Smooth" will give you a smoothed version (blue) of the original connection (grey). I've added the grey one manually to show the difference, it will not be shown in the model. But I'm not sure this is what you want...
Besides that, it makes most sense to me to align models to enable straight lines. This can be a bit of a pain depending on the placement of the connectors within the icon. The shortcut CTRL+Shift+Arrow-Key can help as it moves the model half of the usual grid.
Another possibility is to add some auxiliary points by clicking when drawing the connection and selecting the interface with Dymola creating the last right angle to the connection. This will make sub-grid connections look less ugly...

Related

Copy the plots in the NetLogo interface tab

Is there a way to copy plots in NetLogo? I need a relatively large number of plots in the interface tab that have similar code. Creating and adjusting these plots will take time. Is it possible to copy the plots in the interface tab?
Is there a way to copy plots in NetLogo?
Not from within the graphical interface, but you can copy plots and pens by opening your model's nlogo file in a normal text editor. Here are the docs for the format, and here is the section on plot widgets in particular. Here is an example plot as defined in the Wolf Sheep Predation model.
You can just copy/paste an existing plot widget in this way, or even the PENS, each is on their own line. I recommend being very careful if you do this - making sure you maintain blank spaces between widgets, the escape slashes \" for double-quotes in code, and the exact format of the PLOT sections. I'd take regular back-ups of your file and test your changes frequently as you work in case an edit goes wrong.

Miscoloured lines in rule-based layer styling in QGIS

I'm styling a vector layer of roads and have noticed that a small subset of lines appear to be going 'rogue' and ignoring their line colour styling. They still obey the line stroke and width style however but insist on being yellow instead of the desired colour.
I've added a separate rule for one of them and it definitely 'catches' the correct line segment and restyles it in every way EXCEPT for the colour which stubbornly remains yellow.
Can anyone provide me with any clues as to what is going on here?
That line (or lines) are "selected" - You have one of the selection tools active and have clicked on the line. See the manual for more details, you need to click on the clear selection tool
to remove it.

Simulink - how to configure the appearance of a scope

I'm working on generating some figures for a paper from a simulink model, and would prefer to use minimal work to produce them so I'm trying to configure a simulink scope to output the figures I want on its own. The problem is, while I can get colors and such all arranged well, I can't seem to figure out how to modify the spacing between the graphs in a scope showing multiple signals. What I have now looks like the below:
Notice how the two plots have different vertical scales (probably a consequence of having the time scale only on the bottom one), and that there's a large gap of unused space between the plots. This is a concern when trying to publish in a journal, since page space is at a premium and we need to make the information as dense as possible.
So, how can I tweak these margins and formatting? I've tried looking at all the settings I can find, but none seem to affect these parameters.

MATLAB: Changing plotperform window name, and more

So I'm working on some simple neural network problems for a class I'm taking, and I've mostly done all of the work.
However, I'd like to be able to press run and have all of the relevant figures and graphs pop out so I can easily show my work.
To do this I've been drawing setting the names of figures that I plot in using the
figure('Name', 'NameGoesHere', 'NumberTitle', 'off')`
variant of the figure function.
The thing is, one of the things that I have to show are performance graphs for the different networks I made, and using plotperform(tr) sets the window name to Performace (plotperform) even if I try setting the figure name to something else. Any help?
Here's a picture showing what I mean:
Oh, and, being really new to Matlab, correct me if I'm wrong, but since performance is defined as mean absolute error, the lower it is, the better right? So is there a way to set is so plotperform actually selects the lowest point of the graph as the best instead of the first one?
Another thing I'd like to be able to do is have the training information nntraintool open in a new window every time I call the train(netA, P, T) function. Right now, every time it's called it just overwrites the previous info in the nntraintool window. Is it even possible to do this?
This is the window I'm talking about:

Moving "patches" in Matlab figure editor

I inherited a figure (as a .fig-file) and want to change the layout of the legend. I would like to stretch the legend, from taking up half of the right side of the plot to taking up all of the right side of the plot.
I was initially hoping that the "Align distribution" tool could help with this, but as it turns out, the "patches" (i.e., the color samples) refuse to move! I cannot move them with "Align distribution", or drag and drop them by hand. However, there is no problem moving the text corresponding to the patches.
Is there a way to move the color patches?
Is there a way to automate the spreading out of the legend?