Results 1 to 7 of 7

Math Help - Mathematica: Exporting a plot

  1. #1
    Junior Member
    Joined
    Oct 2008
    Posts
    49

    Mathematica: Exporting a plot

    Hi guys

    I wish to export a graph in Mathematica, and I use

    Export["test.pdf", Plot[x^2,{x,1,2}],ImageSize->250].

    When I include "test.pdf" in my LaTeX document, MiKTeX complains that the figure "test.pdf" has no boundary box. I really don't get this - what am I doing wrong?

    Sincerely,
    Niles.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Aug 2008
    Posts
    903
    I think you're compiling it as a Latex-DVI file rather than a Latex-PDF file. In the small menu box in the menu bar, choose Latex-PDF and see if that corrects the problem. I think to compile as DVI you need to include JPEG files.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Oct 2008
    Posts
    49
    Yes, that did the trick. Do you know if it is possible to change the font of the plot? I.e. numbers, variable-names and such.

    And thanks.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Tons.

    Here's some code. I removed the integral part as I had to manually adjust that one and it resulted in messy code when I converted it to raw format to display here.

    Code:
    myText = Graphics[{Blue, 
         Text[Style["This is a test", 15, 
           FontFamily -> "Monotype Corsiva"], 
          {2.4, 2}]}]; 
    Show[{Plot[x^2, {x, 1, 5}, 
        Ticks -> {{{1, 1}, {2, 2}, 
           {Pi, Style[Pi, 40]}}, Automatic}, 
        TicksStyle -> Directive[Red, 20]], 
       myText}, PlotRange -> 
       {{0, 5}, {0, 5}}, PlotLabel -> 
       Style["f(x)=\!\(\*SuperscriptBox[\(x\)\
    , \(2\)]\)", 20, Darker[Green]]]
    Attached Thumbnails Attached Thumbnails Mathematica: Exporting a plot-test-jpg.jpg  
    Last edited by shawsend; March 3rd 2010 at 01:44 PM. Reason: removed integral code
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Oct 2008
    Posts
    49
    Ah, great. Thanks. I am currently using

    Plot[Sinc[x], {x, 0, 10}, AxesLabel -> {\[Omega], x},
    AxesStyle -> Directive[FontFamily -> "Arial", Black, 40]]

    The problem is that choosing FontFamily as "Arial" (or any other FontFamily for that matter) only changes the numbers on the axis and "x", and not the greek letter omega. Do you know if I am doing something wrong here?

    Sincerely,
    Niles.
    Last edited by Niles_M; March 4th 2010 at 12:00 AM.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Hi. Don't know why that is. I tried explicitly specifying Arial:

    Plot[Sinc[x], {x, 0, 10},
    AxesLabel -> {Style[\[Omega], FontFamily -> "Arial"], x},
    AxesStyle -> Directive[FontFamily -> "Arial", Black, 40]

    and looks still unaltered.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Junior Member
    Joined
    Oct 2008
    Posts
    49
    Ok, thanks for helping. It must be a bug.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. How to plot this equation in Mathematica
    Posted in the Math Software Forum
    Replies: 1
    Last Post: December 6th 2011, 03:16 PM
  2. parametric plot in wxMaxima (or Mathematica)
    Posted in the Math Software Forum
    Replies: 3
    Last Post: November 17th 2010, 08:04 PM
  3. Replies: 2
    Last Post: June 22nd 2010, 12:17 PM
  4. box plot
    Posted in the Statistics Forum
    Replies: 1
    Last Post: April 1st 2010, 01:00 PM
  5. Mathematica plot
    Posted in the Math Software Forum
    Replies: 2
    Last Post: February 15th 2010, 11:41 PM

Search Tags


/mathhelpforum @mathhelpforum