Dear all,
I try to draw a circle in Graph Builder via customize Graph,
and see, that the circle does not align with datapoints.
How can I do better, to have the circle at exact same position in the canvas as the data points?
Why does it seem to be ok for y, and not for x? Other ways to accomplish?
Thanks and best regards, Georg
Georg_0-1789394255151.pngGeorg_0-1789394255151.pngGeorg_0-1789394255151.png
New Table( "Circle Data",
Add Rows( 72 ),
Compress File When Saved( 1 ),
New Script(
"y coord vs. x coord", JSL Quote(Graph Builder(show control panel(0),
Size( 540, 540 ),
Variables( X( :x coord ), Y( :y coord ) ),
Elements( Points( X, Y, Legend( 4 ) ), Smoother( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch( {}, "Graph Builder", FrameBox,
{Add Graphics Script( 2, Description( "" ), Circle( {0, 0}, 1 ) )}
)
)
);
) ,
As String( 1 )
),
New Column( "Degree", Numeric, "Continuous", Formula( Row() * 5 ), Set Display Width( 74 ) ),
New Column( "x coord", Numeric, "Continuous", Formula( Cosine( :Degree * (Pi() / 180) ) ), Set Selected, Set Display Width( 123 ) ),
New Column( "y coord", Numeric, "Continuous", Formula( Sine( :Degree * (Pi() / 180) ) ), Set Display Width( 123 ) )
);How Do You Draw a Circle? discusses this about 3/4 down; you might want to use the Size/Scale->SizeToIsometric option.
Size to Isometric should solve this
Names Default To Here(1);
dt = New Table( "Circle Data",
Add Rows( 72 ),
Compress File When Saved( 1 ),
New Script(
"y coord vs. x coord", JSL Quote(Graph Builder(show control panel(0),
Size( 540, 540 ),
Variables( X( :x coord ), Y( :y coord ) ),
Elements( Points( X, Y, Legend( 4 ) ), Smoother( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch( {}, "Graph Builder", FrameBox,
{Add Graphics Script( 2, Description( "" ), Circle( {0, 0}, 1 ) )}
)
)
);
) ,
As String( 1 )
),
New Column( "Degree", Numeric, "Continuous", Formula( Row() * 5 ), Set Display Width( 74 ) ),
New Column( "x coord", Numeric, "Continuous", Formula( Cosine( :Degree * (Pi() / 180) ) ), Set Selected, Set Display Width( 123 ) ),
New Column( "y coord", Numeric, "Continuous", Formula( Sine( :Degree * (Pi() / 180) ) ), Set Display Width( 123 ) )
);
gb = dt << Run Script("y coord vs. x coord");
framebox = Report(gb)[FrameBox(1)];
framebox << Size To Isometric;