本文介绍了我有一个文件包含以下xy数据。需要帮助来使用c#绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
*N1*D2*M15*X0Y1176*M14*X389Y1131*X717Y1099*X724Y1087*X732Y1098*X1663Y1097*X1670Y1085*X1678Y1097*X1788Y1097*X1795Y1085*X1803Y1097*X2070Y1097*X2070Y595*X2058Y588*X2070Y580*X2070Y78*X1803Y78*X1795Y90*X1788Y78*X1678Y78*X1670Y90*X1663Y78*X732Y77*X724Y89*X717Y76*X389Y44*X0Y0*X0Y387*X12Y394*X0Y402*X0Y580*X12Y588*X0Y595*X0Y773*X12Y781*X0Y788*X0Y1176*M15*N2*D2*M15*X0Y1176*M14*X0Y1692*X0Y2209*X242Y2211*X250Y2199*X257Y2212*X1584Y2227*X1776Y2230*X1960Y2231*X1968Y2219*X1975Y2231*X2046Y2230*X2086Y2229*X2125Y2226*X2152Y2222*X2180Y2217*X2207Y2211*X2233Y2204*X2259Y2193*X2284Y2181*X2326Y2159*X2324Y2145*X2338Y2149*X2349Y2134*X2364Y2112*X2378Y2084*X2389Y2055*X2394Y2028*X2398Y2001*X2401Y1954*X2401Y1700*X2389Y1692*X2401Y1685*X2401Y1430*X2398Y1383*X2394Y1356*X2389Y1330*X2378Y1301*X2364Y1273*X2349Y1251*X2338Y1235*X2324Y1240*X2326Y1226*X2284Y1204*X2259Y1192*X2233Y1181*X2207Y1173*X2180Y1167*X2152Y1163*X2125Y1159*X2086Y1156*X2046Y1154*X1975Y1153*X1968Y1165*X1960Y1153*X1776Y1154*X1584Y1158*X257Y1173*X250Y1185*X242Y1173*X0Y1176*M15*N3*D2*M15*X2814Y2231*M14*X2571Y2231*X2564Y2243*X2556Y2231*X557Y2232*X0Y2231*X0Y2545*X12Y2553*X0Y2560*X0Y3007*X12Y3015*X0Y3022*X0Y3336*X2000Y3336*X2556Y3336*X2564Y3324*X2571Y3336*X2814Y3336*X2814Y2791*X2802Y2784*X2814Y2776*X2814Y2231*M15*N4*D2*M15*X0Y3336*M14*X0Y3931*X12Y3939*X0Y3946*X0Y4541*X2000Y4542*X2141Y4541*X2141Y4309*X2129Y4302*X2141Y4294*X2141Y4207*X2141Y3946*X2129Y3939*X2141Y3931*X2141Y3683*X2129Y3676*X2141Y3668*X2141Y3583*X2129Y3576*X2141Y3568*X2141Y3336*X141Y3336*X0Y3336*M15*N5*D2*M15*X4282Y3336*M14*X2283Y3336*X2141Y3336*X2141Y3568*X2153Y3576*X2141Y3583*X2141Y3668*X2153Y3676*X2141Y3683*X2141Y3931*X2153Y3939*X2141Y3946*X2141Y4207*X2141Y4294*X2153Y4302*X2141Y4309*X2141Y4541*X4141Y4542*X4282Y4541*X4282Y3946*X4270Y3939*X4282Y3931*X4282Y3336*M15*N6*D2*M15*X4884Y2185*M14*X4495Y2229*X4167Y2261*X4160Y2274*X4152Y2262*X3221Y2263*X3214Y2275*X3206Y2263*X3096Y2263*X3089Y2275*X3081Y2263*X2814Y2263*X2814Y2765*X2826Y2773*X2814Y2780*X2814Y3282*X3081Y3282*X3089Y3270*X3096Y3282*X3206Y3282*X3214Y3270*X3221Y3282*X4152Y3283*X4160Y3272*X4167Y3284*X4495Y3316*X4884Y3361*X4884Y2973*X4872Y2966*X4884Y2959*X4884Y2780*X4872Y2773*X4884Y2765*X4884Y2587*X4872Y2580*X4884Y2572*X4884Y2185*M15*N7*D2*M15*X2401Y2209*M14*X2644Y2211*X2652Y2199*X2659Y2212*X3986Y2227*X4178Y2230*X4362Y2231*X4369Y2219*X4377Y2231*X4448Y2230*X4487Y2229*X4526Y2226*X4554Y2222*X4581Y2217*X4608Y2211*X4635Y2204*X4661Y2193*X4686Y2181*X4728Y2159*X4726Y2145*X4739Y2149*X4751Y2134*X4766Y2112*X4780Y2084*X4791Y2055*X4796Y2028*X4799Y2001*X4803Y1954*X4803Y1700*X4791Y1692*X4803Y1685*X4803Y1430*X4799Y1383*X4796Y1356*X4791Y1330*X4780Y1301*X4766Y1273*X4751Y1251*X4739Y1235*X4726Y1240*X4728Y1226*X4686Y1204*X4661Y1192*X4635Y1181*X4608Y1173*X4581Y1167*X4554Y1163*X4526Y1159*X4487Y1156*X4448Y1154*X4377Y1153*X4369Y1165*X4362Y1153*X4178Y1154*X3986Y1158*X2659Y1173*X2652Y1185*X2644Y1173*X2401Y1176*X2402Y1692*X2401Y2209*M15*N8*D2*M15*X4884Y1153*M14*X4884Y608*X4872Y601*X4884Y593*X4884Y49*X4642Y49*X4634Y61*X4627Y49*X2627Y49*X2070Y49*X2070Y362*X2082Y370*X2070Y377*X2070Y825*X2082Y832*X2070Y840*X2070Y1153*X4071Y1154*X4627Y1153*X4634Y1141*X4642Y1153*X4884Y1153*M15*QX4884Y0*M0*
我尝试过:
我试图使用Drawline()绘图。但是由于XY值超出了屏幕区域的许多点而感到困惑。
What I have tried:
I tried to Draw using Drawline(). but confused since XY value goes beyond screen area at many points.
推荐答案
xs = (x-xmin)*rect.Width/(xmax-xmin)+rect.Left
而垂直的
ys = rect.Bottom - (y-ymin)*rect.Height/(ymax-ymin);
这篇关于我有一个文件包含以下xy数据。需要帮助来使用c#绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!