开发者

Software for drawing scientific data [closed]

开发者 https://www.devze.com 2022-12-09 21:08 出处:网络
Closed. This question is off-topic. It is not cur开发者_JAVA技巧rently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not cur开发者_JAVA技巧rently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

Improve this question

I'm looking for a software for drawing scientific data, mostly vectors, coordinate systems and diagrams, for example:

Software for drawing scientific data [closed]


Have you looked at: Mathematica, Matlab, Maxima, GNUPlot?


R has excellent charting available, although it requires you to learn some syntax (well worth the effort in my view).

The arrows() function can be used to do that. Here's a simple example of how to use that function:

x <- stats::runif(12); y <- stats::rnorm(12)
i <- order(x,y); x <- x[i]; y <- y[i]
plot(x,y, main="arrows(.) and segments(.)")
## draw arrows from point to point :
s <- seq(length(x)-1)
arrows(x[s], y[s], x[s+1], y[s+1], col= 1:3)

More generally, read "Drawing Diagrams with R" from the recent R Journal article, which includes a discussion of coordinate systems.


This really belongs on SuperUser. But since you asked here, how about PGF/TikZ?

Very simple example:

\documentclass{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}[scale=1.5]
    % Draw axes
    \draw [<->,thick] (0,2) node (yaxis) [above] {$y$}
        |- (3,0) node (xaxis) [right] {$x$};
    % Draw two intersecting lines
    \draw (0,0) coordinate (a_1) -- (2,1.8) coordinate (a_2);
    \draw (0,1.5) coordinate (b_1) -- (2.5,0) coordinate (b_2);
    % Calculate the intersection of the lines a_1 -- a_2 and b_1 -- b_2
    % and store the coordinate in c.
    \coordinate (c) at (intersection of a_1--a_2 and b_1--b_2);
    % Draw lines indicating intersection with y and x axis. Here we use
    % the perpendicular coordinate system
    \draw[dashed] (yaxis |- c) node[left] {$y'$}
        -| (xaxis -| c) node[below] {$x'$};
    % Draw a dot to indicate intersection point
    \fill[red] (c) circle (2pt);
\end{tikzpicture}
\end{document}

Results in:

tikz picture http://media.texample.net/tikz/examples/PNG/intersecting-lines.png


An excellent Python library is matplotlib; it's got great looking output and handles most common types of numeric graphs.


Scilab is a nice open-source version of Matlab, and it has plotting functions. Both are built on the concept of vectors/matrices, and can plot in 2D or 3D

Also, I've gotten away with using Python / Numpy / Scipy and some plotting (like matplotlib) libraries in the past, which gives you some more options in terms of libraries.


In addition to the other options suggested, you may want to try GNUOctave. You could also consider using the GNU Scientific Library and interface with gnuplot.


Personally, I use vector graphics apps for such things. If I'm not at home (and I want to use something free), I use Inkscape for 2D.. or Google SketchUp for 3D. CorelDRAW's got a dimensions tool and snapping and trimming options that can be helpful, and support for VBA macros if you want to loop over an array and/or do some computations. I'm not sure about Illustrator or others, though they may have these too. Of course the numbers involved (if there are any) aren't going to be perfect.. but if you're careful and know what you're doing, you can make your diagrams close enough that nobody's going to notice.


MetaPost: high quality graphs

I used MetaPost (manual) in my own papers and liked it a lot. It's a language to describe your graphs that will be processed into an image. If you know (and like) TeX/LaTeX: MetaPost can include labels and text formatted in LaTeX.

For scientific data, this text-based approach is often more productive than a graphical user interface. You will have to learn the manual but you save a lot of time with the images: With a GUI you need to fiddling with little details that you can get right once with a text-based approach.

JGraph: quick, get's the job done

I also use and like JGraph, another text-based plotting program. It's much simpler to learn and use than MPost but still creates very nice plots. I also use jgraph a lot for graphs generated by programs: A simple perl script reads and processes my input data, writes a simple jgraph script to be processed by jgraph into an image.


On the Mac there's OmniGraphSketcher, which has the advantage of not requiring numbers to make charts for teaching.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号