Wikipedia talk:How to create charts for Wikipedia articles
|Wikipedia Help Project|
- 1 Gnuplot??
- 2 m:EasyTimeline
- 3 Alternative to Inkscape
- 4 Graphs in Excel or Matlab
- 5 More How To on including data and instructions to update wanted
- 6 examples?
- 7 Gnuplot Inkscape compatability
- 8 pstoedit
- 9 Random links
- 10 Gnuplot from Octave
- 11 Invitation to discussion
- 12 3D surface plots
- 13 Incorrect Main template pointing to page on record charts
In the part about Gnuplot, it suggests to create postscript files and then to convert them to png. The output is very nice, but according to the guidelines of Wikipedia it should be better to use SVG for plots: this way we get the highest quality at the minimum space.
Should we change the article according to that?? (it is enough to put "set terminal svg" at the beginning of the gnuplot script!) Alessio Damato 12:07, 26 November 2005 (UTC)
- I've updated it, but it needs work. The article was written before SVG was supported.
- No, it's not as simple as setting the terminal to SVG, as the default output is quite inferior. Lots of tweaks need to be made. I am constantly trying to figure out the best settings. Image:sinc function (normalized).svg is the best I have come up with so far. — Omegatron 04:34, 4 June 2006 (UTC)
- I just tried using gnuplot for the first time, and it took me about 5 hours to make a pretty simple graph. (Image:Geothermal_capacity.svg) I think I'm more technically inclined than most Wikipedia editors, so that's pretty bad. I think any recommendation to use gnuplot here should be accompanied with warnings about the sparse documentation, the inability to make pie charts, the buggy margin and offset calculations that have to be adjusted by hand, the fact that these margins and offset will be different in the SVG output than the windows terminal, the impossibility of saving SVG settings since they reset to windows defaults every time you load an SVG plot file, the need to close the output file with "set ouput" before you can view it, the necessity to keep data and instruction files separate, etc. In short, it is not at all suitable for the average user. The list of recommended software should start with spreadsheets like Excel and OpenOffice Calc, maybe followed by the R programming language for more complicated graphs. (Although I haven't tried R yet.)--Yannick (talk) 17:01, 12 April 2009 (UTC)
- Making good images is always going to take a while. But documentation is usually the reason why any FOSS program is hard to use. The people writing code don't write documentation. There are a bunch of pages at Los Alamos (Not So Frequently Asked Questions), last updated Late 2005, which has some good hints: http://t16web.lanl.gov/Kawano/gnuplot/index-e.html A person who has a blog with some good hints which is more up to date is (3rd quarter 2010): http://gnuplot-tricks.blogspot.com/. As far as I know, Octave, R and a few other packages actually use Gnuplot to make plots. There was a suggestion in one of the pages in Wikimedia/Wikipedia that SVG produced smaller files than PNG. I am producing what might be called a simulation of a gamma spectrum using Gnuplot. The PNG is about 1/6 the size of the SVG from Gnuplot. Plotting what are nominally "delta functions" is probably always going to be like this. And the number of samples has to be significantly more than 1000 to get accurate peak heights. You can set the cursor at the peak to see what the plot has for a peak height. Instead of 'plot f(x)' to plot everything, you can 'print f(0.1234567)' to print the value of the function at the peak (here assumed to be 0.1234567). If the plot height isn't close enough to the true value (from the print), you don't have enough samples. Fortran (talk) 00:00, 10 November 2011 (UTC)
This page is useful. Maybe also worth mentioning that if the graph is a relatively simple bar graph, it can be created by EasyTimeline, which is fun, although the learning curve is a bit steep. (The easiest way to create a new one is to adapt an existing one.) pfctdayelise (translate?) 14:23, 15 November 2006 (UTC)
Alternative to Inkscape
Hi, Have you heard/read about geogebra? I think this might be a lot more useful than Inkscape or maybe even GnuPlot for making plots. I don't want to promote it, but I think it is much easier to use to make graphs than Inkscape or GnuPlot for a beginner. Here's its homepage if you want to take a look at it: http://www.geogebra.org/cms/ It's free software and runs on several platforms as it is programmed in Java —Preceding unsigned comment added by 188.8.131.52 (talk) 00:52, 21 March 2008 (UTC)
- The last time I tried it, the SVG output is wonky. I also remember the author explicitly stating that the program was not intended for artists, and hence he would not develop features for them. It is a great program though. Maybe he was just having a bad day. SharkD (talk) 05:14, 12 August 2009 (UTC)
- More specifically, GeoGebra is not intended as a design tool for creating documents suitable for publishing. It is an interactive program for students to learn the fundamentals of geometry. As of right now, centimeters are the only units supported for image export. Not inches. Not pixels. To determine the exact pixel size of the output you have to 1) set the dots-per-inch, 2) manually calculate the desired output size in inches based on the selected dpi, and 3) convert this value to centimeters. If you want to set the viewing area and coordinate axes to use precise pixel dimensions, you have to 1) decompress the GGB file, 2) modify the decompressed XML file by hand, and 3) recompress everything again. It's a serious pain in the a**. Unfortunately, GeoGebra is the only program out there with its capabilities.
- SVG output is also wonky. The program stores one set of values for element positions, another set of values to scale everything to match what is seen in the application, and a third set of values for the viewport. If your requirements aren't too stringent, then I suppose you could just get away with adjusting the size of the viewport (though you have to make sure not to change the aspect ratio).
- In this case and for this application, FOSS does not adhere to KISS. 05:41, 15 November 2009 (UTC)
Graphs in Excel or Matlab
I was wondering if graphs made in commercial software like Microsoft Excel, Matlab or Mathematica are allowed under a free licence. I would expect that those companies put restrictions in their licences regarding the use of the graphs that can be produced with them. Yet I see a lot of Excel graphs, for instance in here and here. Does anyone know this? Mtcv (talk) 15:33, 21 July 2008 (UTC)
- In general, Yes, as long as the EULA doesn't prohibit it. 'Normal' licenses don't often restrict what you can do with the content you make with the program, but academic and some other limited licenses (like on Student editions of Microsoft Office 2007, though it doesn't obviously say so) do put some restrictions on what you can do with the content (usually, that it be used for educational and/or non-commercial purposes only), in exchange for a cheaper price (though, for MS Office 2007, that's obviously not true, since the restriction applies to the retail version of the edition). Note that Wikipedia does not allow non-commercial images to be used without also having a fair-use rationale.
- However, there are also several FOSS alternatives with no such restrictions.
Program Alternative Excel OpenOffice.org, Gnumeric, R Matlab Octave Mathematica Maxima
More How To on including data and instructions to update wanted
For economic data in particular, the graphs need to be updated periodically, eg GDP, DJIA historical plots. I see some graphs include a data table, but most don't, and I don't see details on instructions to produce update. Can more information be provided on this with recommendations? I think that the data plus the GNUplot commands are the two key requirements. Mulp (talk) 20:08, 11 August 2009 (UTC)
Would it make sense to have examples of GPL code that generates figures? I am thinking of some of the figures I have made might be useful. i.e. File:USDebt.png PDBailey (talk) 22:42, 17 August 2009 (UTC)
- You can use OpenOffice to create these sorts of charts. However, SVG is the preferred image format, and OOo's SVG output isn't always correct. SharkD (talk) 03:19, 4 November 2009 (UTC)
Gnuplot Inkscape compatability
I'm trying to create graphs in Gnuplot and then do post-processing for them in Inkscape. I export the SVG from Gnuplot as in the article and the result looks right when opened in Firefox, but when I open the file in Inkscape I don't see the graph. The graph is there; if go you into the XML editor in Inscape you can select it and then manually set the stroke color which will make it appear. Apparently, Gnuplot uses "stroke:currentColor;" to set the color of the curve and Inkscape only recognizes color names, so if you change the SVG to "stroke:black;" instead then Inkscape will be able to read the file properly and the cirve will appear when you open it. I've tried playing with the linetype and linecolor settings in Gnuplot but it doesn't seem to help. As I said, there is a workaround but it's a bit of a kludge. Is there something I'm doing wrong here or is it Gnuplot or Inkscape or both not working properly?--RDBury (talk) 05:15, 5 September 2009 (UTC)
- Please name and link to the plugin, so that everyone may know what you are talking about. 05:51, 15 November 2009 (UTC)
- Here's a thread describing Gnumeric, a free spreadsheet software that is integrated with GNUplot (meaning you can create charts directly in GNUplot).
- Here's a thread I personally started discussing the woes of getting SVG output from OpenOffice into Inkscape.
- Here's a wiki page documenting users' experiences with SVG in OpenOffice.
- Here's a blog article regarding one user's efforts at importing/exporting between Inkscape and OpenOffice.
- Here's a third-party tool that can be used to import SVG images into OpenOffice. Unfortunately there's no corresponding export tool.
10:32, 20 November 2009 (UTC)
Gnuplot from Octave
"gset" functions were deprecated in octave 2.9.11 (3.0 branch) and all their substitutions like __gnuplot_raw__() were excluded in 3.2.0. The section about GNU Octave is horribly outdated. —Preceding unsigned comment added by 184.108.40.206 (talk) 12:58, 25 August 2010 (UTC)
Invitation to discussion
3D surface plots
I stumbled across a (Windows) tool to create 3D surface plots in SVG a while ago. I think it was called "Agony" or something. Anyone know what I'm talking about? 220.127.116.11 (talk) 02:27, 7 March 2011 (UTC)
- I was thinking of this. Still not sure how it's supposed to be used, though. 18.104.22.168 (talk) 02:43, 7 March 2011 (UTC)
Incorrect Main template pointing to page on record charts
This article cuurently has the hatnote "main|Wikipedia:Charts". That is an article on record charts, so obviously wrong. I presume it is supposed to point somewhere else. --Boson (talk) 21:25, 5 May 2013 (UTC)