1

I am writing my M.Sc. thesis in biochemistry. I am working on breast cancer. I have plotted survival curves with external software. I am writing my thesis with latex (love it) but would like the graphics to have the "latex style" (e.g. fonts,...). I was wondering if someone could please recommend me a strategy.

Thank you very much for your time!

enter image description here

  • 1
    This could help: pgfplots.net – Sigur Feb 27 '15 at 17:41
  • I use matplotlib with the usetex=True option and careful attention to the figure size. – mforbes Feb 27 '15 at 17:53
  • If you can export the data in a CSV file, you can use Tikz to plot it, thus keeping the layout and fonts consistent with the rest of the document, not to mention figures in vector format (pdf). – Nicolas Feb 27 '15 at 17:57
  • 2
    @Johnathan you could change to title of your question to something more broad. It will help other users to find it when facing a similar issue. – Nicolas Mar 2 '15 at 16:13
  • 2
    See: tex.stackexchange.com/q/227606/32374 – darthbith Mar 2 '15 at 16:25
1

One "nice" way to plot data in order to keep consistency in the font labels, any mathematical notations, legends, figure sizes, and so on, not to mention obtaining high quality vector graphs, is to use tikz and pgfplots.

The idea is to export the data is some sort of table. The easiest is probably to use a CSV file, were the data is sorted in columns (on per variable). Then use pgfplots to read the table in a standalone file and compile it using pdflatex. In this way, you would generate a pdf file per figure that you can include in the main tex file as a simple image (which is what you are doing so far).

Here is an example question on how to proceed: plotting csv data with pgfplots

And here is the user manual of pgfplots: pgfplots webpage

As you'll see, there are many options to customize the figure (axes, labels, legends, colors, etc.). My advise would be to try to keep the figures format consistent throughout the thesis, which may sometimes prove to be a hard thing to do !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.