Best Graphdrawing library - graphics

I have some data that has X and Y values and i would like to print them in a graph. I don't need anything advanced because the data is very simple but I would like something that looks good and has nice design (which excel hasn't).
Thanks for any help

MathGL (cross-platform GPL plotting library) is rather simple to use and produce nice plots -- see samples.

Related

What kind of tool can be use to produce this graph?

I am new at graphing tools for big data analysis. Though the following is not from big data, I was wondering what kind of tools are used to create this kind of complex graph:
http://www.bitmover.com/lmbench/mem_lat3.pdf
Associated with the paper http://www.bitmover.com/lmbench/lmbench-usenix.pdf
The article is made in LaTeX (particulary groff project), according to metadata in the chart's PDF, it's saved to PDF from Photoshop (so this lead ends here). Anyway, the TikZ or Asymptote (see gallery) are capable of drawing charts like this..
Looks a little bit like gnuplot, but it can be perfectly done by matplotlib. An example can be found at this page.
Sorry, I never noticed this question before. Larry borrowed that graphic from me and it was created with Excel.
I was considering adding code to lmbench to create that plot automatically and Thorsten's suggestion of mplot3d sounds like a good place to start.

Graphical view of gantt type schedule

Currently i work a lot with different type of scheduling-algorithms and i'm always in need of something easy and nice to output the created example-schedules for presentations.
Before coding it my self im wondering if such a tool is already developed?
It should, as a minimum, take as input a CPU (Y-coordinate) and a start and duration time (X-coordinate) and preferbly produce HTML, Latex, PDF or similar. (A generic Gantt chart drawer should be sufficient)
It can either be a standalone tool that can be called with a task-set consisting of the three parameters - or able to interface with either C/C++ or Java.
Thanks!
I solved it by using JFreeChart. Thanks for the help
Have a look at GraphViz (graphviz.org) - we've used it with success for showing relationships between things, and there's PERL example of using it for GANTT charts (though I haven't used that myself) here: http://www.perlmonks.org/?node_id=68941

Graph paper replacement software : preferred Linux

I need to do something in openGL which forces me to take a pencil and a paper to do graphwork. I would like to know if there is free program to do that. It have Axes (X-Y-Z) and I can plot let say a cube and get coordinates.
Sorry but complex program for modelling like blender are not option here. I need something to replace simple coordinate geometry I could do on paper. No fancy color, material or anything of that sort.
Thanks
Geogebra is a perfect solution!

Can one extend the functionality of PDF, CDF, FindDistributionParameters etc in Mathematica?

I've started doing more and more work with the new Mathematica statistics and data analysis features.
I attended the "Statistics & Data Analysis with Mathematica" online seminar on Tuesday (great presentation, I highly recommend it) but I've run into some problems that I hope someone on this forum might have a few moments to consider.
I've created a rather extensive notebook to streamline my data analysis, call it "AnalysisNotebook". It outputs an extensive series of charts and data including: histograms, PDF and CDF plots, Q-Q plots, plots to study tail fit, hypothesis test data, etc.
This works great as long as I stay with Mathematica's off-the-shelf distributions and probably works fine for simple MixtureDistributions and even ParameterMixtureDistributions as for these Mathematica can likely figure out the moments and PDF and CDF, FindDistributionParameters, etc by breaking the mixtures down into pieces.
I run into trouble when I attempt to define and use even a simple TransformedDistribution i.e.,
LogNormalNormalDistribution[Gamma_, Sigma_, Delta_] :=
TransformedDistribution[ u*v + Delta,
{Distributed[ u, LogNormalDistribution[ Log[Gamma], Sigma] ],
Distributed[ v, NormalDistribution[0, Sqrt[2]]}
];
I'd like to do a lot of things along the lines of such Transformed Distributions. I appreciate the challenge something like this presents (some of which I've learned on this forum - thank you all):
They may not have closed forms;
PDF and CDF calculation may need interpolation, work-arounds, or custom approaches;
FindDistributionParameters and DistributionFitTest won't know how to deal with this kind of thing.
Basically the standard things one would want to use really don't/can't work and one can't fairly expect them to do so.
One can write custom code to do these sorts of things (again this forum has helped me a lot), but then incorporating all of the complexity of custom alternatives into my AnalysisNotebook, just seems silly. The AnalysisNotebook would grow with each new custom function.
It would help me immensely in this effort if I could write my custom versions of PDF, CDF, FindDistributionParameters, DistributionFitTest and anything else I might need to standards that the more general built in versions would simply call seamlessly. This way, something like my AnalysisNotebook could remain simple and uncluttered, a standard component in my tool box. I could spend my time working on the math rather than plumbing, if you take my meaning.
To clarify what I mean by this, similar to how one can define versions of a function to do different things (use different numbers of arguments or other kinds of situational awareness), Mathematica must do something similar for the functions that use distributions as arguments to know which solution to use for a particular built-in distribution. I want the ability to add or extend the functionality of PDF[], CDF[], FindDistributionParameters[], DistributionFitTest[] and related functions at that level -- to add functionality for custom distributions and their required supporting code, which the built in functions would/could call seamlessly.
Perhaps just a dream, but if anyone knows of any way I could approach this, I'd very much appreciate your feedback.
EDIT- The kind of problems I've encountered:
The following code never completes execution
r1 = RandomVariate[LogNormalNormalDistribution[0.01, 0.4, 0.0003], 1000];
FindDistributionParameters[r1, LogNormalNormalDistribution[gamma, sigma, delta]]
To work around this I wrote the following function
myLNNFit[data_] := Module[{costFunction, moments},
moments = Moment[EmpiricalDistribution[data], #] & /# Range[5];
costFunction[gamma_, sigma_, delta_] =
Sqrt#Total[((Moment[LogNormalNormalDistribution[gamma, sigma, delta],#]&/#Range[5]) - moments)^2];
NMinimize[{costFunction[gamma, sigma, delta], gamma > 0, sigma > 0}, {gamma, sigma, delta}] ]
This works fine by itself, but doesn't play well with everything else.
You can use TagSet to specify the symbol to which you want to associate a definition. This lets you define the PDF of a distribution even though PDF is Protected. Here's a trivial example. Note that TriangleWave is a built-in symbol, and TriangleDistribution is something I just made up. This fails:
PDF[TriangleDistribution[x_]] := TriangleWave[x]
This works:
TriangleDistribution /: PDF[TriangleDistribution[x_]] := TriangleWave[x]
Now you can do:
Plot[PDF[TriangleDistribution[x]], {x, 0, 1}]
Dear Jarga, the following tutorial in Mathematica documentation describes now you would enable random number generation for your distribution, look near the bottom of this document for a section 'Defining Distributional Generators'.
It is quite similar to what Joe suggested. You would need to define
In[1]:= Random`DistributionVector[
LogNormalNormalDistribution[gamma_, sigma_, delta_], len_, prec_] ^:=
RandomVariate[LogNormalDistribution[Log[gamma], sigma], len,
WorkingPrecision -> prec]*
RandomVariate[NormalDistribution[0, Sqrt[2]], len,
WorkingPrecision -> prec] + delta
In[2]:= RandomVariate[
LogNormalNormalDistribution[0.01, 0.4, 0.0003], 5]
Out[2]= {-0.0013684, 0.00400979, 0.00960139, 0.00524952, 0.012049}
I am not aware of any documented way to insert a new distribution into the estimation framework. The hypothesis testing should work if CDF is defined for your distribution and works correctly.

How to view output .mp files from Functional MetaPost

I'm interested in using Functional MetaPost on Mac OS X:
http://cryp.to/funcmp/
I'm looking for a tutorial like:
http://haskell.org/haskellwiki/Haskell_in_5_steps
but for a trivial FuncMP example, i.e. using GHC, I can compile something simple such as:
import FMP
myPicture = text "blah"
main = generate "foo" 1 myPicture
but I can't figure out how to view this foo.1.mp output. (It gives a runtime error about not finding 'virmp'; my MetaPost binary is 'mpost'; I can't figure out how to override this Parameter or what my .FunMP file is or should be doing...) I can run mpost on that but the output (foo.1.1) is what, PostScript? EPS? How do I use this? (I imagine I just need a simple LaTeX file with an EPS figure in it or something...)
Preferably, I'd like to generate output (.ps or .pdf that I can view) so I an actually get somewhere with Functional MetaPost, learning it, playing with it, not banging my head against paths and binaries and shell commands.
the output of mpost is eps, which you can view in ghostview...
#ja: This is true (EPS should be mpost's output) but there are a few problems here:
ghostview uses X11 and is ugly (especially on a Mac) to the point of being difficult to use.
I need smooth anti-aliased graphics, specifically PDF so I can import the graphics into Photoshop when I'm done---the on screen results matter!
In the end, I'm not the only one having trouble with Functional Metapost's non-standard Metapost output.
My solution is to try something else:
Asymptote ... "a powerful descriptive vector graphics language that provides a mathematical coordinate-based framework for technical drawings. Labels and equations are typeset with LaTeX, for overall document consistency, yielding the same high-quality level of typesetting that LaTeX provides for scientific text. By default it produces PostScript output, but it can also generate any format that the ImageMagick package can produce."
It looks really impressive and improves on Metapost in many ways (true floating point, full 3D!) and the programming language looks fairly modern and well thought out (first class functions, Pythonic/Java-ish syntax).
Wow! This is so cool. Asymptote delivers (once you get it installed... the problems are all on the FOSS packages/X11/texlive/macports and especially lazwutil side...)

Resources