I think matplotlib has an even better API and produces better looking graphs. Plus it has an awesome gallery of snapshots with code included, so creating great looking graphics is really dead simple.
This might seem out of left field but I've actually found the python library matplotlib (along with numpy and scipy) really easy to use for quick graphing of datasets; much easier than learning a new language (R) or fighting with Excel (I believe my datasets are too large)
I'd say it's better to start off with some other programming language to understand the basics. Matlab works, but the syntax is horrible and might scare you away from the wonders of programming. If you know the basics of programming already, learning matlab once you need it becomes a bit easier.
Consider learning something like Python. Due to the clunkiness of Matlab there's a growing number of scientists and engineers using python with various extra modules to visualize data, often with the matplotlib module which mimic the matlab plot commands, so it's easy to learn to use both.
Do you want a meteogram with wind barbs? You can do something like this with nearly any graphics plotting software if you're clever.
For instance, you can do this very easily in Python with the matplotlib library. Just take your winds and decompose them into u and v components, scaling for the windspeed (should be easy to do if you know wind direction and speed) so that you have two 1D arrays. Then, just call this matplotlib routine and you're all set.
e.g. -
import numpy as np from pylab import *
u = np.random.random_integers(-20, 20, 10) v = np.random.random_integers(-20, 20, 10)
figure() barbs(u, v)
Python is awesome. I do exoplanet research at UCF and we live by rigorous number crunching. You will need NumPy and probably SciPy. Also, for plotting, you need to get matplotlib. The pyplot module of matplotlib will be a good starting point. Play with those.
As far as web apps go, I don't know exactly if you will be able to combine these, but give it a shot. If you want to make a GUI program, I would recommend the PyQt API. A friend of mine has a gui app in the works which uses matplotlib to make some dynamic plots and such.
Tutorials and links:
Matplotlib added some tools for creating animations which are really nice. You can find some good example animations on the matplotlib examples page. Regarding gif
s you can check the following class
My off-campus access to Science isn't working at the moment so can't check, but if I remember right they do publish what I think of as cartoony graphs -- lots of colours and bold lines.
In my field most figures tend to be quite simple and spare, eg:
http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html
http://matplotlib.sourceforge.net/examples/pylab_examples/boxplot_demo.html
http://matplotlib.sourceforge.net/examples/pylab_examples/errorbar_demo.html
Anyway, what you need to do is look at the matplotlib gallery and choose an example that's similar to what you want and then say what shortcomings you perceive.
This issue comes up from time to time in mailing lists. It has to do with updating the event loop of the matplotlib window. In Windows you can solve it like this:
If you have PyQt4 installed and you're using the Qt4Agg matplolib backend, you can add these lines to your script:
-> from PyQt4.QtGui import QApplication
for j in b: for k in t: #some equation of y plt.figure() plt.plot(t, y, label = 'something') -> plt.show() -> QApplication.processEvents()
This will update the window and you could see one plot after the other.
You can check what your backend is with:
>>> import matplotlib >>> matplotlib.get_backend()
If you don't get 'Qt4Agg' see how to change it in these links:
http://matplotlib.sourceforge.net/users/customizing.html#customizing-matplotlib
http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#locating-matplotlib-config-dir
I you install Python(x,y) you'll get PyQt4 and could use this backend. I'm not sure about EPD because I haven't used it.
Hope this helps.
J.
For matplotlib, you want to start with a pyplot tutorial. From that link, "matplotlib.pyplot is a collection of command style functions that make matplotlib work like MATLAB." which is basically what you want to learn at first. Later, if you want to, say embed it in a Qt app, you can learn to do that without much difficulty (well, if you know Qt).
I can't recommend any tutorial for numpy, because I don't use it much. It's basically consists of MATLAB style functions, and it's array based (not lists). The resources I use the most are the docs and this tutorial.
If you want a general purpose language, Python+matplotlib will do the job quite well. Add in Numpy and you have a replacement for a good chunk of Matlab.
Assuming you're using matplotlib...
If you just want to change the font size globally, you can set matplotlib's rc parameters: example, rc docs
Also, text-generating commands have a parameter to adjust font sizes.
For example, xlabel
has a "fontsize" parameter. IPython might be helpful for figuring out the relevant parameter name; e.g.:
In [1]: import matplotlib.pyplot as plt. In [2]: plt.xlabel?<enter>
I presume you're using this as a way of zooming in on the picture.
Right, the centre co-ordinate is already there for you, I'm sure it would be trivial to work out how to go from there, to the top-left x,y and bottom right x, y.
The python-powered matplotlib is a good option if you want some of the interactivity/UI of Matlab, as well as the scriptability, without being able to shell out for Matlab.
I use matplotlib for all my graphics, but I do a lot of graphing.
this is their gallery page if that helps.
You don't need to use a lot of classes (or any) to make this work, although you will want to start with the tutorial.
On a more general note: One thing I really like about python is that, if you are suitably clever, the list and dictionary types are dynamic enough to do away with classes altogether. Obviously you can't scale up very easily without classes, but for small problems, what would be a class becomes a dictionary, with the key as the 'name' and a list as the value. Since dictionaries can take anything as a key and list can except anything as values, all you need to do is think creatively.
Workaround:
# http://matplotlib.sourceforge.net/api/animation_api.html s = anim.to_jshtml(fps=30) with open('animation.html', "w") as f: f.write(s) # anim.save('animation.html', fps=30, extra_args=['-vcodec', 'libx264'])
animation.html file size is ~6 MB then
This for example, although there is some sort of array down the page in one example they use a bivariate_normal() function which I don't understand what it does and last example "add.outer()" function which I don't understand either.
This where there are some arrays, but it's all jumbled with functions and I have no idea what is going on there.
So I finally found this where it says to use scipy.interpolate.griddata() but it still didn't work with the dataset I had... Some other guy here on reddit said he could get it to work with a smaller dataset, but it didn't work for me no matter what I tried.
So yeah, impressive functionality, but very difficult to wrap my head around how to implement it. I'm currently looking at Mayavi, thinking that maybe it's easier to go that route.
Have you considered using Python with http://matplotlib.sourceforge.net/ to graph the output of sar? You could run the script on a cron to collect the data then dump it out to an html file for download/web browsing. Could be a cool little tool.
mai, sincer io-mi bag pula in el origin. Ii mult prea scump la cat ofera, are o interfata grafica de doi lei, si plot-urile ce le face nici nu-s asa de fancy. Pe scurt ii un cacat de vandut la experimentalisti care fac in pantaloni cum vad o linie de terminal.
Gnuplot pare a fi o varianta destul de populara, desi personal gasesc plot-urile facute cu el destul de inestetice. Personal pentru plot-uri folosesc matplotlib pentru ca poate face niste grafice absolut grozave, si il recomand la toata lumea cu caldura.
Since I'm already using python this sounds like a good route to take.
Installing numpy, scipy and matplotlib only good a couple of minutes. Then another minute and pasting this anim.py example into a file and running it - and I had a nice little gtk animation.
Any recommendations on an effective way to capture this video and save it as a movie on linux?
And here's a bit more info on creating a movie from a sequence of images. And Matplotlib's FAQ on making a movie that describes how to convert a number of images into a movie.
I really love matlab and mathematica but they are not really affordable and I only bought the student version of matlab in school and I found it quite useful.
But piggybacking on your sage comment of getting 95% of problems done I'd recommend taking a look at just the python packages for getting work done (and of course sage with maxima is probably better for symbolics).
The main python packages I'm thinking of: http://www.scipy.org/ http://numpy.scipy.org/ http://matplotlib.sourceforge.net/
Though of course it depends on what you are working on.
Using MATLAB, python's matplotlib or something similar:
MATLAB: plot3d, contour, surfc
http://www.mathworks.com/help/techdoc/ref/surf.html
Python: Not sure but here's a starting point:
http://matplotlib.sourceforge.net/examples/mplot3d/surface3d_demo.html
Note: MATLAB is expensive. Python is free.
Finally, you can use Excel's Surface plots. But IMO Excel surfaces look like complete fucking shit.
Yes I'm french while I'm leaving in Belgium.
We have all the European Parliament vote data (but some of the old one can come with importations problems). We are already doing some visualization on the votes tracked by la Quadrature du Net (I love visualization :p).
Just before showing it to you, a concept: on each vote we define the best way to vote for each amendment and we add a weight to each of them. In result each eurodeputies get a score. All our current visualizations turn around representing how each group/country/eurodeputy have scored.
The tracked votes. There is visualizations on each vote and on each part of the vote (and on each eurodeputy page).
If you have idea for better visualizations or want to do some don't hesitate to share. We are currently using matplotlib.
I'm currently the maindev, a various number of contributors come and go. We are principally looking for django devs, webdevs and webdesigners. Feel free to drop on irc.
Matplotlib?
http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html#scatter-plots
Animating it doesn't seem too difficult (http://www.scipy.org/Cookbook/Matplotlib/Animations)
I hear it is a bitch to install on windows though, so use linux or an enthought distribution
Matplotlib has specgram for making spectrograms. They have an example plotting the spectrogram of a chirp.
SciPy's Signal Processing package has tools for digital filtering, correlation, and convolution if you need to preprocess the samples or estimate the pitch.
Go for it. Not only is it a really elegant and well-designed language in itself, there's also tons of useful libraries developed for it which you might find useful. For instance SciPy, NumPy, Matplotlib.
I don't know anything about high energy physics (and even my classical mechanics are rusty :/). I would assume that Python + SciPy + matplotlib could be the basic framework for most of what you would need to do. What's missing from there? Sets of built-in equations, perhaps?