T O P I C R E V I E W |
Clairekun |
Posted - 08/07/2022 : 9:15:55 PM Origin Ver. and Service Release (Select Help-->About Origin): 2018b Operating System: Win10
Hello,
I have some ternary graphs where I want to slightly change the default axis titles position.
With an existing graph, I move the labels manually and then, get the desired positions using commands like YR.x and YR.y.
If I run
YR.x = 0.506;
YR.y = 1.26;
It works fine and the original axis title position changes. However, if I include those lines in a loop over all graphs, the resulting labels are displaced.
Thinking there might be some differences in the conversion between the values and the real units Origin works with, I tried different position indicators: YR.x/YR.y, YR.x1/YR.y1, YR.top/YR.left. I aslo tried set name -ty xoffset. The displacement is different depending on the command used, but they're still always in the wrong place.
This only happens with axis titles; I used ObjectName.x1/y1 on the legend and another text label, also inside a loop, and it works as expected.
Is there anything I am missing? I assume it somehow has to do with the fact that the graph is ternary, but I still can't manage to get it right.
Thank you.
EDIT: After some fiddling, I realized the issue only happens for Y axis. The theme applied before the repositioning commands shows the right X/Y offset values, but Y axis is still misplaced. If I reapply the theme, nothing happens.
Edit 2: Since it is apparently impossible to correct Y axis position, I decided to delete it and create a new label with the same information:label -r YR;
label -sl -p 50 5 -n TopY \b(%(?Y)); This finally worked, although it's not a solution per se but a lazy fix.
|
2 L A T E S T R E P L I E S (Newest First) |
Clairekun |
Posted - 08/08/2022 : 5:31:20 PM It's a doc -ef P command. It should work. The loop adds a new plot, applies a theme, has a legendupdate command, creates a secondary legend label, some commands for positioning those two legends, and then YR.x and YR.y commands.
The graph itself is enlarged compared to the default one. I can't think of any other relevant details. There are around 100 graphs in total.
YR label does move, it just ends up in a slightly different place. If I check its coordinates, X/Y offset, etc., they are not the same that I wrote in the code or typed in the theme.
Anyway, I'll have to use the fix. For some reason it won't work for me, I hope it's something on my part and it works for everyone else.
Thanks again. |
YimingChen |
Posted - 08/08/2022 : 11:12:39 AM How do you loop over all graphs? I tried the code below and it works fine.
doc -e P {
YR.x = 0.506;
YR.y = 1.26;
}
James |
|
|