Program for graphs and diagrams

In summary, the conversation is about finding a good program for quickly making graphs and diagrams for mathematics notes. Suggestions include gnuplot, MathGV, GrafEQ, Mathematica, and Maple. For diagrams, xypic in latex is recommended. Tips for using latex are also provided, along with a sample latex file. The conversation also mentions the need for Ghostscript and MikTeX for using pdflatex.
  • #1
Zurtex
Science Advisor
Homework Helper
1,120
1
Hi, I'm typing up all my maths notes for when I go to university and I have some fairly good programs for displaying all the maths symbols etc. However could someone please point me in the direction of a good program that I could use to quickly make graphs of functions or easily make diagrams to illustrate geometry problems?
 
Mathematics news on Phys.org
  • #2
  • #3
For diagrams, then depending on where you want to use them, try using xypic in latex (ie produce your document entirely using latex) you can insert graphs as eps files which may be created in ways muzza suggests.
 
  • #4
Thanks muzza.

Matt, could you please explain further. I've only ever used Latex on this website so I'm not overly used to it, however I've been planning to teach myself over the next couple of months anyway.
 
  • #5
Well, basically it's like this.

You will need to borrow a basic outline (often called a preamble), and then between the begin document and end document command you type as if you're typing here: plain text then you start a maths environment by using the command \ [ (no space, cos i think that the latex here would pick it up if i did it literally) do the symbols stuff and end \ ] again no space, then text then...

once you've done that you pass it through a translator, it produce a dvi file (easily converted to ps or pdf) et voila. Now, how you implement all this depends on your system.

Windows? Then you want to look up MikTeX. Linux and you can install it directly using whatever you use, you want the TeTeX package. (Mac not au fait with.) That installs all the compilers and fonts and things you need (though you may need to install xypic in windows, but that should be easy). Basically it's like typing in plain old html. there are a bunch of commands to remember etc, and then you need a compiler type thingy, and so on.

there's loads of online documentation (something like tex in under sixty nine hours is often cited) and books to help you.

there are WISYWIG editors as well if you like that kind of thing (emacs of vim are my preferred tools, they have tex modes that highlight the syntax and match brackets and so on).

xypic is a very powerful way to create diagrams, graphs (in the sense of graph theory) and so on, google for it, look at their documents and see if it appears to do what you want. as a guide it WILL do what you want, no matter how bizarre, but it may take you a month to figure out how.

the key to starting is to have a basic framework to work in. if you like i'll email you mine, with copious notes added explaining what all the stuff means. this is the general way of starting to use latex.

oh, and miktex etc are all free to obtain (though the editors often aren't if they're MS based ones)
 
  • #6
I think you need Ghostscript as well, in order to run Miktex.
 
  • #7
if you want to make it into a ps file, or read them, which is the usual thing, yes.
 
  • #8
That's great thanks, I'll spend tommorw trying to make sense of what was said lol.
 
  • #9
Thanks, I've downloaded MikTeX, but I can't seem to find anything about what I do now. And on the web sites I've been on I can't seem to make heads nor tails of xypic.
 
  • #10
Have you read this?
 
  • #11
Muzza said:
Have you read this?
:biggrin: Thanks, I'm sure this will be a big help.
 
  • #12
I don't think you need Ghostscript if you use PDFLatex. Is this correct?

I suggest gnuplot. It is free and easy to use. If you have about $100, go for Maple or Mathematica.
 
  • #13
Well, I needed Ghostscript to use pdflatex ;)
 
  • #14
zurtex, here's a sample latex file. have you installed emacs? probably should do so, or you need to get used to command lines (ok, some of you will use winedit too). when you save it change the ending to .tex not .txt, you can't upload .tex files here which seems like a bizarre idea.

anyway, open in some text editor to see what it looks like and change it around.

to process it, well, get a dos prompt up, move to the dir the file is in and type

> latex sample.tex

it should produce sample.dvi, you can use yap to view it, yap comes with miktex.

there will be some errors when you do this to do with citations, you can ignore them.

then ask questions (pm me if nec)
 

Attachments

  • sample.txt
    10.8 KB · Views: 519
  • #15
Mathematica is cool :) I like it. Pretty easy to use as well, it has a GUI, but it's not that good.
 
  • #16
I tried what you said matt but I just go this:

Code:
C:\Documents and Settings\Damian\Desktop>latex sample.tex
This is e-TeX, Version 3.141592-2.1 (MiKTeX 2.4)
etex.exe --ini --interaction=nonstopmode --halt-on-error --alias latex *C:/texmf
/tex/latex/base/latex.ltx \dump
This is e-TeX, Version 3.141592-2.1 (MiKTeX 2.4) (INITEX)
entering extended mode
(C:/texmf/tex/latex/base/latex.ltx (C:\texmf\tex\latex\00miktex\texsys.cfg)
./texsys.aux found


\@currdir set to: ./.


Assuming \openin and \input
have the same search path.


Defining UNIX/DOS style filename parser.

catcodes, registers, compatibility for TeX 2,  parameters,
LaTeX2e <2003/12/01>
hacks, control, par, spacing, files, font encodings, lengths,
====================================

Local config file fonttext.cfg used

====================================
(C:\texmf\tex\latex\00miktex\fonttext.cfg (C:\texmf\tex\latex\base\fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===

(C:\texmf\tex\latex\base\omlenc.def) (C:\texmf\tex\latex\base\t1enc.def)
(C:\texmf\tex\latex\base\ot1enc.def) (C:\texmf\tex\latex\base\omsenc.def)
(C:\texmf\tex\latex\base\t1cmr.fd) (C:\texmf\tex\latex\base\ot1cmr.fd)
(C:\texmf\tex\latex\base\ot1cmss.fd) (C:\texmf\tex\latex\base\ot1cmtt.fd)))
====================================

Local config file fontmath.cfg used

====================================
(C:\texmf\tex\latex\00miktex\fontmath.cfg (C:\texmf\tex\latex\base\fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===

(C:\texmf\tex\latex\base\omlcmm.fd) (C:\texmf\tex\latex\base\omscmsy.fd)
(C:\texmf\tex\latex\base\omxcmex.fd) (C:\texmf\tex\latex\base\ucmr.fd)))
====================================

Local config file preload.cfg used

=====================================
(C:\texmf\tex\latex\base\preload.cfg (C:\texmf\tex\latex\base\preload.ltx))
page nos., x-ref, environments, center, verbatim, math definitions, boxes,
title, sectioning, contents, floats, footnotes, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================
(C:\texmf\tex\generic\babel\hyphen.cfg (C:\texmf\tex\generic\hyphen\ushyph.tex)
(C:\texmf\tex\generic\hyphen\frhyph.tex
frhyph.tex - French hyphenation patterns (V2.11) <2002/01/16>)
(C:\texmf\tex\generic\hyphen\dehypht.tex
German Traditional Hyphenation Patterns `dehypht' Version 3.2a <1999/03/03>
(Formerly known under the name `ghyph31' and `ghyphen'.))
(C:\texmf\tex\generic\hyphen\dehyphn.tex
New German Hyphenation Patterns `dehyphn' Rev.31 <2001-05-07> (WaS))
(C:\texmf\tex\generic\hyphen\dumyhyph.tex)
(C:\texmf\tex\generic\hyphen\zerohyph.tex))
=================================
Applying patch file ltpatch.ltx
=================================
(C:\texmf\tex\latex\base\ltpatch.ltx)
 )
Beginning to dump on file latex.efmt
 (preloaded format=latex 2004.7.8)
4359 strings of total length 54759
43926 memory locations dumped; current usage is 144&41982
3142 multiletter control sequences
\font\nullfont=nullfont
\font\OMX/cmex/m/n/10=cmex10
\font\tenln=line10
\font\tenlnw=linew10
\font\tencirc=lcircle10
\font\tencircw=lcirclew10
\font\OT1/cmr/m/n/5=cmr5
\font\OT1/cmr/m/n/7=cmr7
\font\OT1/cmr/m/n/10=cmr10
\font\OML/cmm/m/it/5=cmmi5
\font\OML/cmm/m/it/7=cmmi7
\font\OML/cmm/m/it/10=cmmi10
\font\OMS/cmsy/m/n/5=cmsy5
\font\OMS/cmsy/m/n/7=cmsy7
\font\OMS/cmsy/m/n/10=cmsy10
3633 words of font info for 14 preloaded fonts
14 hyphenation exceptions
Hyphenation trie of length 23218 has 713 ops out of 2048
  2 for language 4
  235 for language 3
  207 for language 2
  88 for language 1
  181 for language 0
No pages of output.
Transcript written on latex.log.
entering extended mode
(sample.tex
LaTeX2e <2003/12/01>
Babel <v3.8a> and hyphenation patterns for english, french, german, ngerman, du
mylang, nohyphenation, loaded.
(C:\texmf\tex\latex\base\article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(C:\texmf\tex\latex\base\size12.clo)) (C:\texmf\tex\latex\base\latexsym.sty)
(C:\texmf\tex\latex\amsfonts\amsfonts.sty)
(C:\texmf\tex\latex\amsmath\amscd.sty (C:\texmf\tex\latex\amsmath\amsgen.sty))
(C:\texmf\tex\latex\amsfonts\amssymb.sty)

! LaTeX Error: File `enumerate.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
 
  • #17
okay, this means that one of the package's I've specified isn't in your system, the way round this is to remover enumerate from the first \usepackage{..} instruction.
 
  • #18
matt grime said:
okay, this means that one of the package's I've specified isn't in your system, the way round this is to remover enumerate from the first \usepackage{..} instruction.
kk thanks, I'll work it out later
 
  • #19
Sorry to come up with another problem but I removed the package command and tried it again and it came up with this error:

Code:
(sample.tex
LaTeX2e <2003/12/01>
Babel <v3.8a> and hyphenation patterns for english, french, german, ngerman, du
mylang, nohyphenation, loaded.
(C:\texmf\tex\latex\base\article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(C:\texmf\tex\latex\base\size12.clo)) (C:\texmf\tex\generic\xypic\xy.sty
(C:\texmf\tex\generic\xypic\xy.tex Bootstrap'ing: catcodes, docmode,
(C:\texmf\tex\generic\xypic\xyrecat.tex)
(C:\texmf\tex\generic\xypic\xyidioms.tex)

 Xy-pic version 3.7 <1999/02/16>
 Copyright (c) 1991-1998 by Kristoffer H. Rose <krisrose@ens-lyon.fr>
 Xy-pic is free software: see the User's Guide for details.

Loading kernel: messages; fonts; allocations: state, direction,
utility macros; pictures: \xy, positions, objects, decorations;
kernel objects: directionals, circles, text; options; algorithms: directions,
edges, connections;  Xy-pic loaded) (C:\texmf\tex\generic\xypic\xyall.tex
 Xy-pic option: All features v.3.3 (C:\texmf\tex\generic\xypic\xycurve.tex
 Xy-pic option: Curve and Spline extension v.3.7 curve, circles, loaded)
(C:\texmf\tex\generic\xypic\xyframe.tex
 Xy-pic option: Frame and Bracket extension v.3.7 loaded)
(C:\texmf\tex\generic\xypic\xycmtip.tex
 Xy-pic option: Computer Modern tip extension v.3.3
(C:\texmf\tex\generic\xypic\xytips.tex
 Xy-pic option: More Tips extension v.3.3 loaded) loaded)
(C:\texmf\tex\generic\xypic\xyline.tex
 Xy-pic option: Line styles extension v.3.6 loaded)
(C:\texmf\tex\generic\xypic\xyrotate.tex
 Xy-pic option: Rotate and Scale extension v.3.3 loaded)
(C:\texmf\tex\generic\xypic\xycolor.tex  Xy-pic option: Colour extension v.3.3
loaded) (C:\texmf\tex\generic\xypic\xymatrix.tex
 Xy-pic option: Matrix feature v.3.4 loaded)
(C:\texmf\tex\generic\xypic\xyarrow.tex
 Xy-pic option: Arrow and Path feature v.3.5 path, \ar, loaded)
(C:\texmf\tex\generic\xypic\xygraph.tex  Xy-pic option: Graph feature v.3.7
loaded) loaded))
No file sample.aux.

! LaTeX Error: Environment lem undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.165 \begin{lem}

Also could you please explain how I install packages and what they do. (Oh and I tried asking it for help but it just came up with more and more confusing errors)
 
  • #20
shoot, i'd forgotten about that bit.

let me produce some more examples and see which works

sample corrects the problem but uses my preferred way of numbering theorem headings and such

sample2 I've removed all the offending things inside the body, but there are no examples of lemma headings and so on, but you can create your own using the info in any latex starter guide
 

Attachments

  • sample2.txt
    7.7 KB · Views: 505
  • sample.txt
    10.9 KB · Views: 476
  • #21
Thanks loads, I got the sample2 to work but the sample came up with an error:

! Undefined control sequence.
l.69 \newtheoremstyle
{ordinary}{1ex}{0pt}{}{}{\scshape}{.}{\newline}{}

Erm, I'm just reading a LaTeX starting guide and I've tried using the command:

\begin{equation}
\end{equation}

But it doesn't seem to recognise \end{equation} :uhh:, any help would be great thanks.
 
  • #22
Everything I now write it comes up with some error, even things that it was fine with before it is now coming up with all sorts or errors I don't understand :uhh:.

Does anyone please know why I get this error:

! LaTeX Error: Bad math environment delimiter.

I'm getting it a lot now :confused:
 
  • #23
the joy of tex, eh?

the \newtheoremstyle is one of these compound error things. first insert \usepackage{amsthm} in the preamble

hopefully this will work.





i don't konw why the equation environment isn't working.



here's a slim-line outline guaranteed to work. errors will be to do with what you write rather than what I've buggered up. every one makes lots of errors, usually owing to a missing $ sign some where.
 

Attachments

  • sample.txt
    772 bytes · Views: 413
  • #24
Excellent everything is working now thanks. :biggrin:
 

1. What is a program for graphs and diagrams?

A program for graphs and diagrams is a software tool that allows users to create, edit, and analyze visual representations of data. These graphs and diagrams can be used to illustrate relationships, trends, and patterns within the data.

2. What are the benefits of using a program for graphs and diagrams?

Using a program for graphs and diagrams can help users better understand complex data by presenting it in a visual format. It can also make data more accessible and easy to interpret for others who may not have a strong background in data analysis.

3. What types of graphs and diagrams can be created with this program?

There are a variety of graphs and diagrams that can be created using this type of program, including bar graphs, line graphs, scatter plots, pie charts, and more. Some programs may also offer more specialized types of graphs, such as network graphs or tree diagrams.

4. Is it difficult to learn how to use a program for graphs and diagrams?

The difficulty of learning a program for graphs and diagrams will depend on the specific software and the user's level of experience. However, many programs offer user-friendly interfaces and tutorials to help users get started.

5. Can this program be used for both scientific and non-scientific data?

Yes, a program for graphs and diagrams can be used for a wide range of data, including both scientific and non-scientific data. These programs can be helpful in any field where data analysis and visualization are important, such as business, healthcare, education, and more.

Similar threads

Replies
5
Views
975
Replies
8
Views
454
Replies
3
Views
2K
  • General Math
Replies
17
Views
1K
  • General Math
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
112
  • General Math
Replies
28
Views
2K
Replies
35
Views
3K
  • General Math
Replies
16
Views
2K
Replies
6
Views
265
Back
Top