MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Re: Re: export import eps | illustrator


Pratik,

If I were not exporting the EPS, I would not have been able to open it
in Illustrator. If you really want to see what my code does:
1. Make a new notebook and save it somewhere on your hard drive.
2. Make a directory below it called Engine Map.
3. Paste this code into the notebook and execute it:
NotebookDirectory=
   DirectoryName[
     ToFileName["FileName"/.NotebookInformation[EvaluationNotebook[]]]];
Export[ToFileName[NotebookDirectory,"\\Engine Map\\temp2.eps"],
 Plot[x^2,{x,0,3},Epilog->{Hue[0],Line[{{1,0},{1,9}}]},ImageSize->600]]
Show@Import[ToFileName[NotebookDirectory, "\\Engine Map\\temp2.eps"]]

Thank you for trying to help me.

On 8/15/05, Pratik Desai <pdesai1 at umbc.edu> wrote:
> Chris Chiasson wrote:
> 
> >The syntax was correct, I just forgot to mention that the code exports
> >to a directory below the notebook called "Engine Map".
> >
> >I really need some help from someone that knows how to export EPS from Illustrator and Import to Mathematica
> >
> >
> Yes....maybe, but first you need to find someone who can help you to
> export  from Mathematica to EPS.
> The correct syntax for exporting  graphics, in my humble opinion is
> 
> Export["filename.format", plot, "EPS"]
> 
> I think you are missing the EPS in your initial Export command, may be
> that is why you get this behaviour
> 
> >The result of these commands is a Graphics object that has misaligned
> >text on the axes, but is otherwise acceptable.
> >
> >
> 
> 
> Best Regards
> 
> Pratik
> 
> >On 8/13/05, Pratik Desai <pdesai1 at umbc.edu> wrote:
> >
> >
> >>Chris Chiasson wrote:
> >>
> >>
> >>
> >>>>I usually get this error when I try to export a graphic and it is not
> >>>>defined
> >>>>
> >>>>
> >>>>
> >>>>
> >>>I have not made this error. Note the Plot statement is inside the
> >>>Export statement. Thank you for your response.
> >>>
> >>>On 8/13/05, Pratik Desai <pdesai1 at umbc.edu> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Chris Chiasson wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>Hello MathGroup,
> >>>>>I am trying to Import some 2D vector graphics from a PDF. I have taken
> >>>>>the graphics and put them in an Adobe Illustrator file. I have tried
> >>>>>all manner of export methods.
> >>>>>
> >>>>>PS
> >>>>>EPS
> >>>>>DXF
> >>>>>SVG
> >>>>>
> >>>>>In all cases Mathematica either can't read the files or reads them
> >>>>>incorrectly in a way that makes it impossible to obtain the data I
> >>>>>need. Also, using ghostview/pstoedit on the ps and eps output of
> >>>>>Illustrator has been ineffective.
> >>>>>
> >>>>>So, I decided I would start small:
> >>>>>
> >>>>>NotebookDirectory=
> >>>>>  DirectoryName[
> >>>>>    ToFileName["FileName"/.NotebookInformation[EvaluationNotebook[]]]];
> >>>>>Export[ToFileName[NotebookDirectory,"\\Engine Map\\temp2.eps"],
> >>>>>Plot[x^2,{x,0,3},Epilog->{Hue[0],Line[{{1,0},{1,9}}]},ImageSize->600]]
> >>>>>Show@Import[ToFileName[NotebookDirectory, "\\Engine Map\\temp2.eps"]]
> >>>>>
> >>>>>The result of these commands is a Graphics object that has misaligned
> >>>>>text on the axes, but is otherwise acceptable.
> >>>>>
> >>>>>Now:
> >>>>>I open Illustrator, open the temp2.eps file, save it as an eps
> >>>>>(varying the version of the EPS has had no effect), close Illustrator
> >>>>>and then issue the following command again:
> >>>>>
> >>>>>Show@Import[ToFileName[NotebookDirectory, "\\Engine Map\\temp2.eps"]]
> >>>>>
> >>>>>The output is now:
> >>>>>DeleteFile::privv: Privilege violation during DeleteFile[C:\DOCUME~
> >>>>>        1\Chris\LOCALS~1\Temp\.00009a03480].
> >>>>>Import::fmterr: Invalid EPS format.
> >>>>>Show::gtype: Symbol is not a type of graphics.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>I usually get this error when I try to export a graphic and it is not
> >>>>defined
> >>>>lets say
> >>>>plot1=Plot[..........]
> >>>>SetDirectory["C://"]
> >>>>Export["plot1.png", plot, "PNG"]
> >>>>when plot and plot1 do not match it gives you the gtype error
> >>>>
> >>>>I hope this helps
> >>>>
> >>>>Pratik Desai
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>Show[$Failed]
> >>>>>
> >>>>>What is going on? How do I fix this problem? If I can import this
> >>>>>basic graphic with your help, I may be able to tackle the other one.
> >>>>>
> >>>>>Versions:
> >>>>>Win XP SP2
> >>>>>Mathematica 5.2 Student
> >>>>>Adobe Illustrator CS 2 Tryout
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>--
> >>>>Pratik Desai
> >>>>Graduate Student
> >>>>UMBC
> >>>>Department of Mechanical Engineering
> >>>>Phone: 410 455 8134
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>Well this worked on my ver 5.1.1 Windows XP
> >>NotebookDirectory =
> >>    DirectoryName[
> >>      ToFileName["FileName" /. NotebookInformation[EvaluationNotebook[]]]];
> >>Export[ToFileName[NotebookDirectory, "\\temp2.eps"],
> >>  Plot[x^2, {x, 0, 3}, Epilog -> {Hue[0], Line[{{1, 0}, {1, 9}}]},
> >>ImageSize \
> >>-> 600], "EPS"]
> >>Show@Import[ToFileName[NotebookDirectory, "\\temp2.eps"]]
> >>
> >>what I meant earlier in my email was that the Export in your code was
> >>not in the correct syntax
> >>
> >>Anyway hope this helps
> >>
> >>Pratik Desai
> >>
> >>--
> >>Pratik Desai
> >>Graduate Student
> >>UMBC
> >>Department of Mechanical Engineering
> >>Phone: 410 455 8134
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> 
> 
> --
> Pratik Desai
> Graduate Student
> UMBC
> Department of Mechanical Engineering
> Phone: 410 455 8134
> 
> 
> 


-- 
Chris Chiasson
http://chrischiasson.com/
1 (810) 265-3161


  • Prev by Date: Re: Linking to Mathematica Kernel from Excel
  • Next by Date: Re: Some bugs in Mathematica
  • Previous by thread: Re: Re: Re: export import eps | illustrator
  • Next by thread: Re: Re: Re: export import eps | illustrator | pstoedit