Hi Christian,
yes, it is not the first time that people get confused when the offset is displayed in the top left corner. Main reason for this handling is basically to keep the number at the left y-axis short in order to keep the distance between the left y-axis and the left figure border constant. If this is not ensured, one can easily observe some annoying “jumping” of the y-axis as distance can vary with the length of the number. So, we thought that this solution is the least awkward solution.
If you like to experiment yourself with different options, we implemented a way to overwrite the matplotlib style. We use the python library matplotlib for plotting and one can put a default.mplstyle file into the public SweepMe! folder Resources\mplstyles
C:\Users\Public\Documents\SweepMe!\Resources\mplstyles
You can find a template of such a file here
https://matplotlib.org/stable/users/explain/customizing.html#the-default-matplotlibrc-file
Just copy the text and save it as default.mplstyle into the above given folder.
Further, you can find the SweepMe! default style in your SweepMe! installation here:
C:\Program Files\SweepMe!\SweepMe!_1.5.7\Widgets\Plot\mplstyles
where you can copy the default.mplstyle file to the public SweepMe! folder “Resources\mplstyles”
You can now uncomment lines by removing the # symbol to activate lines and make changes.
The section with AXES parameters starts from line ~ 344.
Some properties are overwritten by the Plot settings, e.g. line width, marker size etc.
Here is a setting that you can copy and paste into the sequencer to create slightly varying random number with an offset.
{
"child_items": [
{
"child_items": [
{
"child_items": [
{
"child_items": [
{
"child_items": [],
"is_checked": true,
"is_expanded": true,
"module_details": {
"module_type": "Calc",
"Label": "Calc1",
"value": "",
"Variable": "Parameter",
"Unit": "a.u.",
"Function": "random()/1e5 + 1",
"Plot": true,
"Save": true,
"Execution": "Always",
"Value1": "",
"Value2": "",
"Value3": "",
"Comment": ""
}
}
],
"is_checked": true,
"is_expanded": true,
"module_details": {
"module_type": "Hold",
"Label": "Hold",
"value": "0.030",
"Comment": ""
}
}
],
"is_checked": true,
"is_expanded": true,
"module_details": {
"module_type": "Loop",
"Label": "Loop",
"value": "nonstop",
"Repetitions": "0",
"UseReduction": false,
"MaxPoints": 10000,
"Reduction": "Quadratic",
"KeepLastPoints": 10,
"Comment": ""
}
}
],
"is_checked": true,
"is_expanded": true,
"module_details": {
"module_type": "MakeFile",
"Label": "MakeFile",
"value": "ID",
"FileID": "ID",
"ShowAdvancedOptions": false,
"BranchIndex": true,
"FileIndex": true,
"ModuleLabels": true,
"Comment": ""
}
}
],
"data_type": "Sequencer",
"version": "v1"
}
There is no need to restart SweepMe! to make changes active, but you need at least to renew the Plot widget, by either removing the widget and create it again. Or simply save the setting and reload it.
If we can find a well working way, we will be happy to include it as new default style and of course everone is invited to play around with the styles.
Please note that running with your own custom default styles sometimes can lead to strange behavior that is hard to debug, if one forgets about the use of a changed default style. Thus, we don’t recommend using own style files for productive use but rather to test new options quickly.
Thanks and best
Axel