親愛なるみんな、
グラフビルダーでグラフをカスタマイズして円を描画しようとしています。
そして、円がデータポイントと一致していないことがわかります。
円をキャンバス上のデータポイントと全く同じ位置に配置するにはどうすればよいですか?
なぜyの場合は問題ないのに、xの場合は問題になるのでしょうか?他に実現する方法はありますか?
ありがとうございます。よろしくお願いいたします。ゲオルグ
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 ) )
);
「円の描き方」という記事の3/4くらいのところでこの点について説明されています。 サイズ/スケール→アイソメトリックサイズオプションを使用すると良いでしょう。
サイズをアイソメトリックにすれば解決するはずです。
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;