Graphics, Figures & TablesAdding figures with PSTricks

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
rootpi
Posts: 5
Joined: Wed May 19, 2010 10:09 pm

Adding figures with PSTricks

Post by rootpi »

Hey!
Well this is my first post so I think I should present myself :) : I'm from spain and I'm studying Physics and this year i've started to work with Latex. My problem of today is that I've done a picture with a program called inkscape,and when I was saving I've seen that there was the option of saving as .tex. I've done it but now i don't know how to do it in order it doesn't give me an error when compiling.

I'm using

Code: Select all

 \usepackage{pstricks}
, but it stills give me an error, i don't know if I need more packages or what. I leave here the code that's been saved (it's a little bit long) in case this can help.

Code: Select all

%LaTeX with PSTricks extensions
%%Creator: 0.46
%%Please note this file requires PSTricks extensions

\psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
\begin{pspicture}(744.09448242,1052.36218262)
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.02327617,linecolor=curcolor]
{
\newpath
\moveto(580.97919419,602.97320224)
\curveto(580.97919419,519.98459428)(513.77042254,452.63152114)(430.95961462,452.63152114)
\curveto(348.1488067,452.63152114)(280.94003505,519.98459428)(280.94003505,602.97320224)
\curveto(280.94003505,685.96181021)(348.1488067,753.31488334)(430.95961462,753.31488334)
\curveto(513.77042254,753.31488334)(580.97919419,685.96181021)(580.97919419,602.97320224)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.50308073,linecolor=curcolor]
{
\newpath
\moveto(431.67601,349.90667262)
\lineto(431.67601,597.69466262)
\lineto(433.11499,841.21048262)
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(431.67601,364.93747987)
\lineto(425.6636871,370.94980278)
\lineto(431.67601,349.90667262)
\lineto(437.6883329,370.94980278)
\lineto(431.67601,364.93747987)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.50308073,linecolor=curcolor]
{
\newpath
\moveto(431.67601,364.93747987)
\lineto(425.6636871,370.94980278)
\lineto(431.67601,349.90667262)
\lineto(437.6883329,370.94980278)
\lineto(431.67601,364.93747987)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(426.35082315,825.18156858)
\lineto(433.10030955,843.20672315)
\lineto(439.63630264,825.10306124)
\curveto(435.73148572,828.01217341)(430.36558802,828.02725208)(426.35082315,825.18156858)
\closepath
}
}
{
\newrgbcolor{curcolor}{1 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(431.75479,452.69734262)
\lineto(207.73494,454.45847262)
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.53491426,linecolor=curcolor]
{
\newpath
\moveto(431.75479,452.69734262)
\lineto(207.73494,454.45847262)
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(224.08981214,447.51910706)
\lineto(205.69639599,454.4474609)
\lineto(224.1964674,461.08577544)
\curveto(221.21796474,457.10406605)(221.19186953,451.62456527)(224.08981214,447.51910706)
\closepath
}
}
{
\newrgbcolor{curcolor}{0.95294118 0.07058824 0.07058824}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(437.89832507,599.58265944)
\curveto(437.89832507,596.15903705)(435.39720139,593.38044497)(432.31545972,593.38044497)
\curveto(429.23371806,593.38044497)(426.73259438,596.15903705)(426.73259438,599.58265944)
\curveto(426.73259438,603.00628183)(429.23371806,605.78487392)(432.31545972,605.78487392)
\curveto(435.39720139,605.78487392)(437.89832507,603.00628183)(437.89832507,599.58265944)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.53491426,linecolor=curcolor]
{
\newpath
\moveto(437.89832507,599.58265944)
\curveto(437.89832507,596.15903705)(435.39720139,593.38044497)(432.31545972,593.38044497)
\curveto(429.23371806,593.38044497)(426.73259438,596.15903705)(426.73259438,599.58265944)
\curveto(426.73259438,603.00628183)(429.23371806,605.78487392)(432.31545972,605.78487392)
\curveto(435.39720139,605.78487392)(437.89832507,603.00628183)(437.89832507,599.58265944)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(188.22062114,457.14809559)
\lineto(191.73880781,457.14809559)
\curveto(192.31780487,459.69195815)(192.98022429,461.58460071)(193.72606806,462.82602895)
\curveto(194.47189469,464.06742214)(195.44344317,465.04681378)(196.64071642,465.76420683)
\curveto(197.83796671,466.48155895)(198.96653313,466.84024524)(200.02641907,466.84026678)
\curveto(200.62503508,466.84024524)(201.07646165,466.71813927)(201.38070013,466.4739485)
\curveto(201.68490616,466.22971538)(201.83701728,465.9397137)(201.83703396,465.60394258)
\curveto(201.83701728,465.29865735)(201.73397426,465.04426991)(201.52790459,464.84077949)
\curveto(201.32180218,464.63725)(201.0519276,464.53549503)(200.71828004,464.53551426)
\curveto(200.37478775,464.53549503)(199.72708876,464.64233775)(198.77518113,464.85604275)
\curveto(198.30411371,464.95777818)(197.93610292,465.00865567)(197.67114766,465.00867537)
\curveto(197.02343616,465.00865567)(196.43952571,464.59400414)(195.91941455,463.76471954)
\curveto(195.39928188,462.93539802)(194.98220298,461.81354941)(194.66817662,460.39917033)
\lineto(193.9321543,457.14809559)
\lineto(197.81835212,457.14809559)
\lineto(197.58282498,456.064404)
\lineto(193.65246582,456.064404)
\lineto(191.32663531,446.32644303)
\curveto(190.61023481,443.36537219)(189.46449455,441.12167496)(187.8894111,439.59534461)
\curveto(186.31432219,438.06902567)(184.60429873,437.30586335)(182.75933557,437.30585535)
\curveto(182.14107984,437.30586335)(181.67247944,437.4305132)(181.35353295,437.67980526)
\curveto(181.03459407,437.92911258)(180.87512273,438.23692138)(180.87511845,438.6032326)
\curveto(180.87512273,438.91867973)(180.98552597,439.17052329)(181.20632849,439.35876405)
\curveto(181.42713891,439.54701671)(181.74362819,439.64114006)(182.15579727,439.6411344)
\curveto(182.36188632,439.64114006)(182.66610857,439.61570131)(183.06846494,439.56481809)
\curveto(183.75542051,439.47324435)(184.41293312,439.42745461)(185.04100475,439.42744873)
\curveto(186.01255335,439.42745461)(186.71913406,439.66403493)(187.16074901,440.1371904)
\curveto(187.60235996,440.61035621)(188.0439729,441.76781906)(188.48558918,443.60958244)
\lineto(191.47383977,456.064404)
\lineto(187.95565311,456.064404)
\lineto(188.22062114,457.14809559)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(417.84800802,335.4365974)
\lineto(417.40639463,336.04712787)
\curveto(418.3779406,337.0544922)(419.30042098,337.79730353)(420.17383853,338.27556408)
\curveto(421.04724552,338.75380031)(421.734199,338.9929245)(422.23470101,338.99293738)
\curveto(422.44077971,338.9929245)(422.59534424,338.94713476)(422.69839507,338.85556803)
\curveto(422.80143028,338.7639758)(422.85295179,338.63678208)(422.85295976,338.47398649)
\curveto(422.85295179,338.27046417)(422.77444283,337.87870751)(422.61743262,337.29871533)
\curveto(422.39171161,336.44396234)(422.23469367,335.76729175)(422.14637834,335.26870152)
\curveto(424.50164013,337.75151379)(426.30243959,338.9929245)(427.54878212,338.99293738)
\curveto(427.87261896,338.9929245)(428.11795949,338.90134502)(428.28480444,338.71819867)
\curveto(428.4516226,338.53502711)(428.53503838,338.24502543)(428.53505203,337.84819275)
\curveto(428.53503838,337.42081012)(428.38783406,336.69326204)(428.09343864,335.66554633)
\curveto(429.21217823,336.87642099)(430.18372672,337.73370667)(431.008087,338.23740593)
\curveto(431.83241505,338.74108094)(432.47520723,338.9929245)(432.93646547,338.99293738)
\curveto(433.3486195,338.9929245)(433.66756219,338.87081853)(433.89329447,338.6266191)
\curveto(434.11898875,338.38239464)(434.2318454,338.00590123)(434.23186474,337.49713774)
\curveto(434.2318454,337.19186142)(434.18277729,336.83063125)(434.08466028,336.41344615)
\curveto(433.98650487,335.99624045)(433.6283077,334.72430324)(433.0100677,332.59763072)
\curveto(432.23477351,329.96217035)(431.84713548,328.39005596)(431.84715244,327.88128285)
\curveto(431.84713548,327.53531416)(431.98452618,327.3623307)(432.25932494,327.36233195)
\curveto(432.44576637,327.3623307)(432.62731836,327.42338369)(432.80398145,327.54549109)
\curveto(433.38296718,327.97286056)(433.97669125,328.50198644)(434.58515545,329.13287031)
\lineto(435.07093018,328.58339289)
\curveto(434.86482395,328.41040696)(434.47718592,328.05426454)(433.90801492,327.51496457)
\curveto(433.12290622,326.78232734)(432.58315706,326.32442994)(432.28876583,326.14127102)
\curveto(431.71955841,325.79530407)(431.23869098,325.62232061)(430.84616209,325.62232012)
\curveto(430.5517375,325.62232061)(430.29167655,325.7724092)(430.06597844,326.07258634)
\curveto(429.84024998,326.37276356)(429.72739334,326.78741509)(429.72740817,327.31654217)
\curveto(429.72739334,327.80496485)(429.79608868,328.37733659)(429.93349442,329.03365911)
\curveto(430.07087007,329.68997579)(430.47322854,331.16287907)(431.14057102,333.45237338)
\curveto(431.64104944,335.17202514)(431.89129678,336.21501365)(431.89131378,336.58134203)
\curveto(431.89129678,336.92729848)(431.74409246,337.10028194)(431.44970039,337.10029293)
\curveto(431.2043433,337.10028194)(430.875587,336.97308822)(430.46343049,336.71871139)
\curveto(429.61944351,336.1895749)(428.91286279,335.5434308)(428.34368622,334.78027715)
\curveto(427.95112793,334.2511426)(427.60765119,333.41166405)(427.31325498,332.26183897)
\curveto(426.65572995,329.7484849)(426.1650489,327.69812212)(425.84121035,326.11074449)
\lineto(423.75090698,326.11074449)
\lineto(425.94425348,335.4365974)
\curveto(426.10126036,336.10817092)(426.17976933,336.49483983)(426.17978062,336.59660529)
\curveto(426.17976933,336.75940277)(426.14051484,336.88405262)(426.06201705,336.97055521)
\curveto(425.98349691,337.05703608)(425.87064027,337.10028194)(425.72344678,337.10029293)
\curveto(425.45846818,337.10028194)(425.0462961,336.88659649)(424.4869293,336.45923594)
\curveto(423.51537121,335.73676526)(422.81615072,335.0371998)(422.3892657,334.36053745)
\curveto(421.96236568,333.68385861)(421.5968083,332.65358947)(421.29259245,331.26972695)
\lineto(420.15911809,326.11074449)
\lineto(418.05409427,326.11074449)
\lineto(419.7175047,333.39132033)
\curveto(420.20818092,335.49764106)(420.45352145,336.64238455)(420.45352701,336.82555422)
\curveto(420.45352145,337.05957995)(420.36519886,337.17659817)(420.18855898,337.17660924)
\curveto(419.80582246,337.17659817)(419.02563959,336.59659481)(417.84800802,335.4365974)
\lineto(417.84800802,335.4365974)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(446.081824,339.05399043)
\lineto(447.27418015,339.32872914)
\curveto(446.55777215,336.94764948)(445.90025954,334.56149528)(445.30164035,332.1702594)
\curveto(444.86982933,330.46076973)(444.57051389,329.03620006)(444.40369313,327.89654611)
\curveto(444.31535975,327.32671646)(444.26629164,326.60425613)(444.25648866,325.72916295)
\curveto(444.23685078,324.26389167)(444.07983284,323.08353395)(443.78543438,322.18808623)
\curveto(443.37325213,320.93650394)(442.60533628,319.92912968)(441.48168454,319.16596041)
\curveto(440.35801706,318.40280503)(439.025818,318.02122387)(437.48508337,318.02121578)
\curveto(436.16024066,318.02122387)(435.11754342,318.34429592)(434.35698853,318.9904329)
\curveto(433.59643216,319.63658412)(433.21615434,320.37685157)(433.21615395,321.21123748)
\curveto(433.21615434,322.03545769)(433.5203766,322.80370776)(434.12882162,323.51599)
\curveto(434.58024767,324.05529397)(435.52235529,324.70652582)(436.9551473,325.4696875)
\curveto(437.68135192,325.86653255)(438.36339858,326.27355246)(439.00128934,326.69074844)
\curveto(438.27507599,326.30407895)(437.71079278,326.11074449)(437.30843801,326.11074449)
\curveto(436.94533034,326.11074449)(436.62393425,326.28627183)(436.34424878,326.63732702)
\curveto(436.06455785,326.98838116)(435.92471375,327.45391018)(435.92471606,328.03391547)
\curveto(435.92471375,329.90620511)(436.4620095,331.7657773)(437.53660493,333.61263763)
\curveto(438.61119251,335.45948295)(439.90413709,336.8458945)(441.41544253,337.77187645)
\curveto(442.34772873,338.34169265)(443.51554963,338.62660659)(444.91890875,338.6266191)
\curveto(445.19367883,338.62660659)(445.53224876,338.61643109)(445.93461954,338.59609258)
\lineto(446.081824,339.05399043)
\closepath
\moveto(444.43313402,336.7950277)
\curveto(443.96206939,336.88659649)(443.54499049,336.93238623)(443.18189608,336.93239705)
\curveto(442.24959252,336.93238623)(441.4497824,336.67799879)(440.78246334,336.16923397)
\curveto(440.11512994,335.66044903)(439.54593992,334.80570722)(439.07489157,333.605006)
\curveto(438.4173735,331.9056904)(438.08861719,330.47603298)(438.08862167,329.31602945)
\curveto(438.08861719,328.83777786)(438.21864767,328.4358457)(438.47871349,328.11023178)
\curveto(438.73876959,327.78461385)(439.03072481,327.62180589)(439.35458005,327.6218074)
\curveto(439.74711915,327.62180589)(440.23289339,327.81768422)(440.81190423,328.20944298)
\curveto(441.39090067,328.60119754)(441.86440789,329.0921653)(442.2324273,329.68234774)
\curveto(442.60042947,330.27252303)(442.97580047,331.29007279)(443.35854144,332.73500008)
\lineto(444.43313402,336.7950277)
\closepath
\moveto(442.43115332,328.47655006)
\curveto(441.76381827,327.85584234)(440.47823392,326.86373132)(438.57439639,325.50021402)
\curveto(436.89626224,324.31985691)(435.86583203,323.47020286)(435.48310267,322.95124932)
\curveto(435.10036958,322.4221266)(434.90900397,321.86247423)(434.90900527,321.27229053)
\curveto(434.90900397,320.692292)(435.1567979,320.17079775)(435.65238781,319.7078062)
\curveto(436.14797363,319.24482746)(436.74905792,319.01333489)(437.45564248,319.01332779)
\curveto(438.12296487,319.01333489)(438.77066385,319.18377448)(439.39874139,319.52464706)
\curveto(440.02680735,319.86553282)(440.57391672,320.35904445)(441.04007115,321.00518345)
\curveto(441.50621072,321.65133265)(441.82760681,322.38142461)(442.00426038,323.1954615)
\curveto(442.18089717,324.00950423)(442.27412657,325.08810698)(442.28394886,326.43127299)
\curveto(442.29375381,326.7263621)(442.34282192,327.40812044)(442.43115332,328.47655006)
\lineto(442.43115332,328.47655006)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(436.65713269,873.12257639)
\lineto(437.09678335,871.21772133)
\curveto(437.50501518,869.48108537)(437.90802788,867.96154439)(438.30582267,866.65909383)
\curveto(438.70358543,865.35661699)(439.72420202,862.34466969)(441.3676755,857.62324289)
\curveto(441.52467436,858.22020131)(441.83871023,859.54437274)(442.30978406,861.59576114)
\curveto(442.91690006,864.26580364)(443.31991277,865.94272565)(443.51882338,866.6265322)
\curveto(444.10500245,868.63448396)(444.67026702,870.11060949)(445.2146188,871.0549132)
\curveto(445.75892472,871.99918185)(446.36606074,872.67754836)(447.03602868,873.09001476)
\curveto(447.70594714,873.50244203)(448.46486716,873.70866545)(449.31279104,873.70868564)
\curveto(449.99317508,873.70866545)(450.51395124,873.57299215)(450.87512108,873.30166533)
\curveto(451.23623375,873.03029894)(451.41680437,872.70468302)(451.4168335,872.32481658)
\curveto(451.41680437,872.05345117)(451.31997665,871.81466616)(451.12635003,871.60846083)
\curveto(450.93266573,871.40221932)(450.70498973,871.29910761)(450.44332132,871.29912539)
\curveto(450.25487164,871.29910761)(450.03504653,871.35337693)(449.78384533,871.46193351)
\curveto(449.26042471,871.67899286)(448.94638884,871.80381229)(448.84173676,871.8363922)
\curveto(448.65328869,871.87978934)(448.44916537,871.90149707)(448.2293662,871.90151545)
\curveto(447.716415,871.90149707)(447.27676477,871.72240831)(446.91041421,871.36424864)
\curveto(446.26138212,870.73470668)(445.5469505,869.15546944)(444.76711723,866.6265322)
\curveto(443.987239,864.09756875)(442.99540903,860.05450436)(441.79162435,854.49732689)
\lineto(441.25776283,852.07148583)
\curveto(440.06440755,854.79580718)(439.25838214,856.72779499)(438.83968419,857.86745508)
\curveto(438.27440307,859.39784557)(437.63062953,861.32983339)(436.90836164,863.66342433)
\lineto(435.18116261,869.29658545)
\curveto(434.97179247,867.99410598)(434.4824199,865.79891195)(433.71304343,862.7109968)
\curveto(432.94364412,859.62306326)(432.48567513,857.845743)(432.33913511,857.3790307)
\curveto(431.85760339,855.91375518)(431.34206116,854.79038024)(430.79250689,854.00890251)
\curveto(430.2429356,853.22742381)(429.64103351,852.65759594)(428.98679881,852.2994172)
\curveto(428.33255071,851.94124091)(427.61288516,851.76215215)(426.82780002,851.76215039)
\curveto(425.84381641,851.76215215)(425.037791,851.99008329)(424.40972138,852.44594451)
\curveto(423.92819758,852.78241538)(423.68743675,853.21114301)(423.68743814,853.7321287)
\curveto(423.68743675,853.96005964)(423.77641358,854.16356959)(423.9543689,854.34265917)
\curveto(424.1323209,854.52174711)(424.34691208,854.61129149)(424.59814309,854.61129258)
\curveto(424.92264452,854.61129149)(425.27331791,854.43220273)(425.65016432,854.07402576)
\curveto(426.32010415,853.43364723)(426.93247411,853.11345823)(427.48727601,853.11345783)
\curveto(428.08393897,853.11345823)(428.67013927,853.39023177)(429.24587866,853.94377926)
\curveto(430.10423643,854.79038024)(430.93119756,856.56498703)(431.72676454,859.26760495)
\curveto(432.68979845,862.53461231)(433.61620428,866.68078842)(434.5059848,871.7061457)
\curveto(434.1395974,871.70612752)(433.43825062,871.59758887)(432.40194235,871.38052945)
\curveto(431.36561385,871.16343431)(430.49939823,870.85681265)(429.8032929,870.46066355)
\curveto(429.10717253,870.06448056)(428.57331154,869.54892202)(428.20170834,868.91398636)
\curveto(427.83009331,868.27901991)(427.64428875,867.61422073)(427.64429411,866.91958683)
\curveto(427.64428875,866.57224978)(427.69139413,866.21949919)(427.78561039,865.86133401)
\curveto(427.84841207,865.62253666)(427.98449428,865.32948233)(428.19385743,864.98217014)
\curveto(428.43461237,864.5805657)(428.55499278,864.27665751)(428.55499905,864.07044464)
\curveto(428.55499278,863.80994135)(428.46339899,863.58743713)(428.28021739,863.40293133)
\curveto(428.0970238,863.21840575)(427.86934779,863.12614791)(427.59718868,863.12615751)
\curveto(427.1994046,863.12614791)(426.85919907,863.34051173)(426.57657107,863.76924961)
\curveto(426.2939345,864.19796699)(426.15261835,864.85191231)(426.15262222,865.73108751)
\curveto(426.15261835,867.1854931)(426.50590871,868.42283361)(427.21249435,869.44311276)
\curveto(427.91907014,870.46336007)(428.86379473,871.23398443)(430.04667094,871.75498814)
\curveto(430.80034928,872.08058583)(432.25538216,872.39534789)(434.41177395,872.69927526)
\curveto(435.20731937,872.80779473)(435.95577154,872.94889496)(436.65713269,873.12257639)
\lineto(436.65713269,873.12257639)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.53491426,linecolor=curcolor]
{
\newpath
\moveto(21.48199844,655.78735352)
\lineto(195.61136246,655.78735352)
\lineto(195.61136246,616.43663406)
\lineto(21.48199844,616.43663406)
\lineto(21.48199844,655.78735352)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(195.61132812,655.78735352)
\lineto(261.46794891,655.78735352)
\lineto(261.46794891,616.43663406)
\lineto(195.61132812,616.43663406)
\lineto(195.61132812,655.78735352)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.53491426,linecolor=curcolor]
{
\newpath
\moveto(195.61132812,655.78735352)
\lineto(261.46794891,655.78735352)
\lineto(261.46794891,616.43663406)
\lineto(195.61132812,616.43663406)
\lineto(195.61132812,655.78735352)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.53491426,linecolor=curcolor]
{
\newpath
\moveto(460.15399,761.10841262)
\curveto(562.05318,761.13554262)(581.79453,701.07083262)(586.28616,643.05625262)
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(591.80979275,659.94193053)
\lineto(586.47046278,641.02602716)
\lineto(578.28318531,658.89466867)
\curveto(582.50372824,656.26550433)(587.96560468,656.70540822)(591.80979275,659.94193053)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(595.72017774,722.3529388)
\lineto(594.81339824,719.58113047)
\lineto(593.11760283,716.98027068)
\lineto(591.36292563,716.05226436)
\lineto(589.54936665,716.05226436)
\lineto(588.60725809,717.02911311)
\lineto(587.88890031,719.30028646)
\lineto(586.39330297,716.98027068)
\lineto(584.6032967,715.9667901)
\lineto(582.77796136,716.05226436)
\lineto(581.85940551,717.02911311)
\lineto(580.98795509,719.72765778)
\lineto(580.98795509,722.40178124)
\lineto(581.90651094,725.18580018)
\lineto(583.59052999,727.78665997)
\lineto(585.4511944,728.75129811)
\lineto(586.60527739,727.55465839)
\lineto(583.81428078,726.57780964)
\lineto(582.18914351,724.88053494)
\lineto(581.37657487,722.3529388)
\lineto(581.37657487,719.80092144)
\lineto(582.18914351,718.12806796)
\lineto(582.94283036,717.32216774)
\lineto(584.50908584,717.32216774)
\lineto(586.12244676,718.17691039)
\lineto(587.73580767,719.84976388)
\lineto(587.73580767,722.37736002)
\lineto(588.58370538,722.45062368)
\lineto(588.97232516,722.30409636)
\lineto(588.14798016,719.77650022)
\lineto(588.94877244,718.12806796)
\lineto(589.69068294,717.32216774)
\lineto(591.25693842,717.32216774)
\lineto(592.88207569,718.17691039)
\lineto(594.54254203,719.89860632)
\lineto(595.34333431,722.40178124)
\lineto(595.34333431,724.9537986)
\lineto(594.54254203,726.60223086)
\lineto(592.65832491,727.57907961)
\lineto(593.84773697,728.77571933)
\lineto(594.86050367,727.72560693)
\lineto(595.72017774,725.02706225)
\lineto(595.72017774,722.3529388)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.53491426,linecolor=curcolor]
{
\newpath
\moveto(432.24865,601.39078262)
\lineto(692.32647,602.54815262)
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(676.97747943,602.47984821)
\lineto(670.86520496,596.31293022)
\lineto(692.32647,602.54815262)
\lineto(670.81056144,608.59212268)
\lineto(676.97747943,602.47984821)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=1.53491426,linecolor=curcolor]
{
\newpath
\moveto(676.97747943,602.47984821)
\lineto(670.86520496,596.31293022)
\lineto(692.32647,602.54815262)
\lineto(670.81056144,608.59212268)
\lineto(676.97747943,602.47984821)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(695.00106535,630.34889932)
\curveto(694.87512232,630.14029972)(694.78802643,629.95629281)(694.73977743,629.79687802)
\curveto(694.69152583,629.63746055)(694.66740068,629.47889238)(694.6674019,629.32117303)
\curveto(694.66740068,629.17532336)(694.69847714,628.94722262)(694.76063139,628.63687013)
\curveto(695.12209845,628.92178388)(695.3780704,629.18846671)(695.52854801,629.43691943)
\curveto(695.67902144,629.68537018)(695.75425921,629.89947961)(695.75426152,630.07924836)
\curveto(695.75425921,630.13182014)(695.73544977,630.19796088)(695.69783314,630.27767077)
\curveto(695.6569408,630.36246475)(695.63649575,630.42521366)(695.63649795,630.46591766)
\curveto(695.63649575,630.51000947)(695.65121619,630.54859157)(695.68065929,630.58166406)
\curveto(695.71009791,630.6147323)(695.74526339,630.63126748)(695.78615582,630.63126966)
\curveto(695.84012839,630.63126748)(695.88347188,630.60710068)(695.91618643,630.55876917)
\curveto(695.94889602,630.51043345)(695.96525206,630.42860549)(695.96525458,630.31328504)
\curveto(695.96525206,629.95205302)(695.84176399,629.60015039)(695.59479002,629.25757611)
\curveto(695.29220122,628.83698807)(694.90865219,628.51306806)(694.4441418,628.28581511)
\curveto(694.43269157,628.36552334)(694.40979312,628.49271706)(694.37544638,628.66739666)
\curveto(694.30838571,629.01845111)(694.27485583,629.26266305)(694.27485667,629.40003322)
\curveto(694.27485583,629.58149531)(694.31574592,629.75744662)(694.39752705,629.92788769)
\curveto(694.47930627,630.09832579)(694.60034093,630.24629449)(694.76063139,630.37179421)
\curveto(694.47276386,630.36670454)(694.26667782,630.33363418)(694.14237265,630.27258301)
\curveto(694.05404936,630.22848737)(694.00988807,630.17676192)(694.00988863,630.11740652)
\curveto(694.00988807,630.09366203)(694.02133729,630.05380799)(694.04423634,629.9978443)
\curveto(694.05895617,629.95883668)(694.06631639,629.92576631)(694.06631701,629.8986331)
\curveto(694.06631639,629.87149699)(694.05527606,629.84733019)(694.03319601,629.82613261)
\curveto(694.01111477,629.80493228)(693.98371841,629.7943328)(693.95100685,629.79433415)
\curveto(693.90848065,629.7943328)(693.87249737,629.81298788)(693.84305691,629.85029944)
\curveto(693.81361564,629.8876082)(693.79889521,629.93763773)(693.79889557,630.00038818)
\curveto(693.79889521,630.10044569)(693.83078948,630.19075323)(693.89457847,630.27131107)
\curveto(693.95836655,630.35186528)(694.06876979,630.41503816)(694.22578851,630.46082991)
\curveto(694.38280567,630.50661764)(694.59052731,630.52781659)(694.84895407,630.52442683)
\curveto(694.95363129,630.57191041)(695.01987323,630.59565324)(695.0476801,630.59565539)
\curveto(695.07384815,630.59565324)(695.0975644,630.58462979)(695.11882892,630.56258499)
\curveto(695.14009009,630.54053596)(695.15072151,630.51679314)(695.15072322,630.49135643)
\curveto(695.15072151,630.43878099)(695.1008356,630.39129533)(695.00106535,630.34889932)
\lineto(695.00106535,630.34889932)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(721.27270211,610.06415339)
\curveto(720.46666667,608.72911598)(719.90925295,607.55147175)(719.60045929,606.53121715)
\curveto(719.29164903,605.51094533)(719.13724804,604.49610906)(719.13725588,603.48670528)
\curveto(719.13724804,602.55326741)(719.33613744,601.09342272)(719.73392468,599.10716681)
\curveto(722.04731401,600.93061476)(723.6855346,602.63738486)(724.64859136,604.22748223)
\curveto(725.61162143,605.81756699)(726.09314314,607.18786731)(726.09315793,608.3383873)
\curveto(726.09314314,608.67484666)(725.97276271,609.09814736)(725.73201629,609.60829065)
\curveto(725.47030528,610.15097216)(725.33945699,610.55256512)(725.33947103,610.81307075)
\curveto(725.33945699,611.09525832)(725.43366776,611.34218372)(725.62210361,611.5538477)
\curveto(725.81051083,611.76548441)(726.03556989,611.87130959)(726.29728147,611.87132354)
\curveto(726.64270596,611.87130959)(726.92010433,611.71664203)(727.12947742,611.40732039)
\curveto(727.33881886,611.09797178)(727.44349749,610.57427285)(727.44351363,609.83622202)
\curveto(727.44349749,607.52433709)(726.65317382,605.27216033)(725.07254025,603.07968498)
\curveto(723.13597178,600.38792156)(720.68125787,598.31483356)(717.70839112,596.86041473)
\curveto(717.63510968,597.3705474)(717.48855959,598.18458719)(717.26874043,599.30253656)
\curveto(716.83955207,601.549285)(716.62496088,603.11224141)(716.6249662,603.99141046)
\curveto(716.62496088,605.15276782)(716.88665746,606.2788562)(717.41005672,607.36967898)
\curveto(717.93344378,608.46048285)(718.70806565,609.40748248)(719.73392468,610.2106807)
\curveto(717.89157232,610.17810682)(716.57262156,609.96645647)(715.77706843,609.57572903)
\curveto(715.21179935,609.29351691)(714.92916704,608.96247406)(714.92917067,608.58259948)
\curveto(714.92916704,608.43063473)(715.00244208,608.17556892)(715.14899601,607.81740131)
\curveto(715.24320293,607.56775254)(715.29030832,607.3561022)(715.29031231,607.18244964)
\curveto(715.29030832,607.00877855)(715.21965024,606.85411099)(715.07833787,606.71844649)
\curveto(714.93701794,606.58276439)(714.76168123,606.51492774)(714.55232721,606.51493634)
\curveto(714.28015952,606.51492774)(714.04986653,606.63432025)(713.86144755,606.87311421)
\curveto(713.67302346,607.11189026)(713.57881269,607.43207924)(713.57881496,607.83368212)
\curveto(713.57881269,608.47405018)(713.78293602,609.05201843)(714.19118557,609.56758862)
\curveto(714.59942935,610.08313551)(715.30601011,610.48744194)(716.31092999,610.78050912)
\curveto(717.31583985,611.07355059)(718.64525847,611.20922389)(720.29918986,611.18752943)
\curveto(720.9691241,611.49142435)(721.39307256,611.64337844)(721.57103651,611.64339217)
\curveto(721.73851205,611.64337844)(721.89029606,611.57282833)(722.02638901,611.43174161)
\curveto(722.16246051,611.29062787)(722.23050162,611.13867377)(722.23051255,610.97587887)
\curveto(722.23050162,610.63939603)(721.91123179,610.33548784)(721.27270211,610.06415339)
\lineto(721.27270211,610.06415339)
\closepath
}
}
\end{pspicture}
Thanks for all!!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Adding figures with PSTricks

Post by localghost »

Your example works fine for me. Perhaps a matter of outdated packages. But its always better to use native PSTricks code for such simple sketches.

Code: Select all

\documentclass{minimal}
\usepackage{pstricks-add}

\begin{document}
  \begin{pspicture}[showgrid=false](-8,-6)(6,6)
    \SpecialCoor
    \psline{<->}(0,5)(0,0)(5,0)
    \uput[r](5,0){$v$} \uput[u](0,5){$N$}
    \pscircle[fillcolor=red,fillstyle=solid]{0.1}
    \pscircle{3}
    \psarc{<-}{3.5}{15}{75} \rput(4;45){$\omega$}
    \psline{->}(0,-5) \uput[d](0,-5){$mg$}
    \psline{->}(0,-3)(-4,-3) \uput[l](-4,-3){$f$}
    \psframe[dimen=middle](-8,0.5)(-3.5,1.5)
    \psframe*[dimen=middle](-5,0.5)(-3.5,1.5)
  \end{pspicture}
\end{document}

Thorsten
rootpi
Posts: 5
Joined: Wed May 19, 2010 10:09 pm

Adding figures with PSTricks

Post by rootpi »

localghost wrote:Your example works fine for me. Perhaps a matter of outdated packages. But its always better to use native PSTricks code for such simple sketches.

Code: Select all

\documentclass{minimal}
\usepackage{pstricks-add}

\begin{document}
  \begin{pspicture}[showgrid=false](-8,-6)(6,6)
    \SpecialCoor
    \psline{<->}(0,5)(0,0)(5,0)
    \uput[r](5,0){$v$} \uput[u](0,5){$N$}
    \pscircle[fillcolor=red,fillstyle=solid]{0.1}
    \pscircle{3}
    \psarc{<-}{3.5}{15}{75} \rput(4;45){$\omega$}
    \psline{->}(0,-5) \uput[d](0,-5){$mg$}
    \psline{->}(0,-3)(-4,-3) \uput[l](-4,-3){$f$}
    \psframe[dimen=middle](-8,0.5)(-3.5,1.5)
    \psframe*[dimen=middle](-5,0.5)(-3.5,1.5)
  \end{pspicture}
\end{document}

Best regards and welcome to the board
Thorsten
Hey! Thanks! I don't use to add this kind of images (normally i save it as jpeg and add it by \begin{figure}. I think that if I have time this summer i'll try to learn this :)

By the way, your code also gives me a problem; could it be a problem of the program? It says:

Code: Select all

\documentclass{minimal}
\usepackage{pstricks-add}
\begin{document}

  \begin{pspicture}[showgrid=false](-8,-6)(6,6)
    \SpecialCoor
    \psline{<->}(0,5)(0,0)(5,0)
    \uput[r](5,0){$v$} \uput[u](0,5){$N$}
    \pscircle[fillcolor=red,fillstyle=solid]{0.1}
    \pscircle{3}
    \psarc{<-}{3.5}{15}{75} \rput(4;45){$\omega$}
    \psline{->}(0,-5) \uput[d](0,-5){$mg$}
    \psline{->}(0,-3)(-4,-3) \uput[l](-4,-3){$f$}
    \psframe[dimen=middle](-8,0.5)(-3.5,1.5)
    \psframe*[dimen=middle](-5,0.5)(-3.5,1.5)
  \end{pspicture}
  
\end{document}

Thanks again!! :)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Adding figures with PSTricks

Post by localghost »

rootpi wrote: By the way, your code also gives me a problem; could it be a problem of the program? It says: [...]
It says what? Give the concrete error message from the log file. As I already mentioned, it could be a matter of outdated packages. Add the \listfiles command as very first line to my sample code, start a new run and submit the list of used files (section between *File List* and ***********) from the log within your next post.
rootpi
Posts: 5
Joined: Wed May 19, 2010 10:09 pm

Adding figures with PSTricks

Post by rootpi »

localghost wrote:
rootpi wrote: By the way, your code also gives me a problem; could it be a problem of the program? It says: [...]
It says what? Give the concrete error message from the log file. As I already mentioned, it could be a matter of outdated packages. Add the \listfiles command as very first line to my sample code, start a new run and submit the list of used files (section between *File List* and ***********) from the log within your next post.
Sorry, I didn't realized I had posted your code again. The log file is attached.

Thanks!
Attachments
prova2.log
(20.55 KiB) Downloaded 168 times
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Adding figures with PSTricks

Post by gmedina »

You cannot compile directly with pdfLaTeX when using PS-Tricks commands; you have to follow the route latex, dvips, ps2pdf.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Adding figures with PSTricks

Post by localghost »

If you want to continue compiling with pdflatex, you can use pgf/tikZ instead. It produces also PDF output.

Code: Select all

\documentclass{minimal}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}[>=stealth,thick]
    \draw[<->] (0,5) node[above] {$N$} |- (5,0) node[right] {$v$};
    \filldraw[fill=red] (0,0) circle (1mm);
    \draw (0,0) circle (3cm);
    \draw[<-] +(15:3.5cm) arc (15:75:3.5cm);
    \draw (45:3.5cm) node[above right] {$\omega$};
    \draw[->] (0,0) -- (0,-5) node[below] {$mg$};
    \draw[->] (0,-3) -- (-5,-3) node[left] {$f$};
    \draw (-8,0.5) rectangle (-3.5,1.5);
    \filldraw[fill=black] (-5,0.5) rectangle (-3.5,1.5);
  \end{tikzpicture}
\end{document}
As far as I know Inkscape is also able to export pictures to PDF.
rootpi
Posts: 5
Joined: Wed May 19, 2010 10:09 pm

Adding figures with PSTricks

Post by rootpi »

localghost wrote:If you want to continue compiling with pdflatex, you can use pgf/tikZ instead. It produces also PDF output.

Code: Select all

\documentclass{minimal}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}[>=stealth,thick]
    \draw[<->] (0,5) node[above] {$N$} |- (5,0) node[right] {$v$};
    \filldraw[fill=red] (0,0) circle (1mm);
    \draw (0,0) circle (3cm);
    \draw[<-] +(15:3.5cm) arc (15:75:3.5cm);
    \draw (45:3.5cm) node[above right] {$\omega$};
    \draw[->] (0,0) -- (0,-5) node[below] {$mg$};
    \draw[->] (0,-3) -- (-5,-3) node[left] {$f$};
    \draw (-8,0.5) rectangle (-3.5,1.5);
    \filldraw[fill=black] (-5,0.5) rectangle (-3.5,1.5);
  \end{tikzpicture}
\end{document}
As far as I know Inkscape is also able to export pictures to PDF.
Thanks again! I can see this one. Just one thing, I don't really understand which is the process I should follow in order to compile using the other method. If you have time, could you explain it, please?

Thanks! :)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Adding figures with PSTricks

Post by gmedina »

rootpi wrote:...Thanks again! I can see this one. Just one thing, I don't really understand which is the process I should follow in order to compile using the other method. If you have time, could you explain it, please?..
That depends on the editor that you are using, but some of them have a predefined profile to compile through the route I mentioned before. If not, you can always open a terminal, and run

latex yourfile.tex
dvips yourfile.dvi
ps2pdf yourfile.ps (I'm not sure if it's pstopdf yourfile.pdf in Windows).

the result is the file yourfile.pdf.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply