LaTeX forum ⇒ Graphics, Figures & TablesHow can I draw plots in LaTeX? Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10199
Joined: Mon Mar 10, 2008 9:44 pm

How can I draw plots in LaTeX?

Postby Stefan Kottwitz » Sun Aug 05, 2012 7:24 pm

It seems that PCTeX provides it's own editor, without a specific name, seen at the PCTeX6 Tour. As this seems to be proprietary, I suggest the same as Thorsten: ask the PCTeX support. PCTeX is not freely available, so we hardly can help you.

As PCTeX 6 has been released 2007, with some updates until 2011, this would not be my first choice, when I compare with newer releases such as TeX Live 2012 and MiKTeX 2.9.

I doubt that the official PCTeX6 forum would help much: the majority of questions hasn't got any answer.

Stefan
LaTeX.org admin

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
ditka
Posts: 85
Joined: Fri Jul 13, 2012 11:59 am

Re: latex,gnuplot

Postby ditka » Sun Aug 05, 2012 8:52 pm

What abaut MikTex? How can that be done here?

I have instaled gnuplot.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10199
Joined: Mon Mar 10, 2008 9:44 pm

How can I draw plots in LaTeX?

Postby Stefan Kottwitz » Sun Aug 05, 2012 8:57 pm

If you installed MiKTeX, you probably also installed TeXworks. Look for it in the start menu.

With TeXworks, go to the main menu: Edit / Preferences, choose the Typesetting tab, choose pdfLaTeX, click the Edit button, add --enable-write18 such as here:
texworks.png
texworks.png (79.85 KiB) Viewed 5095 times

Stefan
LaTeX.org admin

ditka
Posts: 85
Joined: Fri Jul 13, 2012 11:59 am

Re: latex,gnuplot

Postby ditka » Sun Aug 05, 2012 9:10 pm

I did what you say, but I still get the same picture.

Do I need to do anything else, perhaps in gnuplot?

I just download document and typsett it.

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

How can I draw plots in LaTeX?

Postby localghost » Sun Aug 05, 2012 9:12 pm

Since the settings for TeXworks differ a bit on Wind0ws, here is s screen capture for MiKTeX (see attachment).
[…] Do I need to do anything else, perhaps in gnuplot? […]

How did you install Gnuplot? The latest version 4.6 has an installer for the first time. You need to check a box in order to add the Gnuplot path to the corresponding environment variable (see attachment).
Attachments
TeXworks044-MiKTeX-Preferences-ToolConfiguration.png
The compiler settings in TeXworks for MiKTeX
TeXworks044-MiKTeX-Preferences-ToolConfiguration.png (42.17 KiB) Viewed 5092 times
Gnuplot-46-Setup.png
The Gnuplot 4.6 Installer with the checked box for the PATH environment variable.
Gnuplot-46-Setup.png (23.37 KiB) Viewed 5092 times
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

ditka
Posts: 85
Joined: Fri Jul 13, 2012 11:59 am

Re: latex,gnuplot

Postby ditka » Sun Aug 05, 2012 11:07 pm

I did that(enable--write18,check Add application directory to your PATH environment variable), but I still get the same picture.

Do I need draw graphs in gnuplot first?

User avatar
Stefan Kottwitz
Site Admin
Posts: 10199
Joined: Mon Mar 10, 2008 9:44 pm

Re: latex,gnuplot

Postby Stefan Kottwitz » Sun Aug 05, 2012 11:54 pm

Gnuplot is called automatically. Perhaps post your .log file here, as attachment to a post. The log file contains information regarding the problem.

Stefan
LaTeX.org admin

ditka
Posts: 85
Joined: Fri Jul 13, 2012 11:59 am

Re: latex,gnuplot

Postby ditka » Mon Aug 06, 2012 10:27 am

I hope this is the right thing.
Attachments
ldsld lfslfld.txt
(15.48 KiB) Downloaded 246 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 10199
Joined: Mon Mar 10, 2008 9:44 pm

How can I draw plots in LaTeX?

Postby Stefan Kottwitz » Mon Aug 06, 2012 10:52 am

Yes, this is the right file. I can see these warnings:
Package pgf Warning: Plot data file `ndkskdkskdksdda-1.x.table' not found. on i
nput line 43.

Package pgf Warning: Plot data file `ndkskdkskdksdda-1.sin.table' not found. on
 input line 45.

Package pgf Warning: Plot data file `ndkskdkskdksdda-1.exp.table' not found. on
 input line 47.

Obiously gnuplot did not run, to produce the .table files.

I have another suggestion: instead of dealing with gnuplot problems, you could switch to pure TeX/LaTeX plotting. Since you now use a modern MiKTeX version, you could work with pgfplots. This is a very capable package for plotting with markers, axis, legends, in 2D and 3D. Perhaps have a look at the pgfplots documentation for a start with it, try some examples from the manual. If you have a question regarding pgfplots, just open a new topic.

Stefan
LaTeX.org admin

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

How can I draw plots in LaTeX?

Postby localghost » Mon Aug 06, 2012 11:22 am

Stefan_K wrote:[…] I have another suggestion: instead of dealing with gnuplot problems, you could switch to pure TeX/LaTeX plotting. Since you now use a modern MiKTeX version, you could work with pgfplots. This is a very capable package for plotting with markers, axis, legends, in 2D and 3D. Perhaps have a look at the pgfplots documentation for a start with it, try some examples from the manual. […]

As far as I know, pgfplots uses Gnuplot as back-end. So the problem would persist.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 9 guests