File:Graphic data for World Record Progression in Men and Women Swimming 50m-100m-200m.png

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(3,162 × 2,079 pixels, file size: 783 KB, MIME type: image/png)

This image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}.


It is recommended to name the SVG file “Graphic data for World Record Progression in Men and Women Swimming 50m-100m-200m.svg”—then the template Vector version available (or Vva) does not need the new image name parameter.

Summary

Description
English: Graphic data for World Record Progression in Men and Women Swimming 50m-100m-200m Long and Short Course Butterfly-Backstroke-Breaststroke-Freestyle. Original table data retrieved from Wikipedia (including glitches e.g. as found in 200m breaststroke) on 2010-04-04 Except source data, this is original work by the author
Date
Source Own work
Author Krfx

author typed own code in Matlab (R) (~Octave) to retrieve data from Wikipedia World Record Progression tables like http://en.wikipedia.org/wiki/World_record_progression_100_metres_freestyle

Use the code to produce further graphic data according to procedure written in code remarks

Code is free for anyone to copy, redistribute, modify, etc. without any links to the author



function [yr,ti]=pooldata(datafile)
% this is matlab code (~octave) i wrote myself for everyone to use and transform table data into graphics data
% according to the following procedure and context:
%
% reads data from datafile (.txt file) containing a formatted "ctrl+c" copy from wikipedia "record progression" table style
% as found e.g. in http://en.wikipedia.org/wiki/World_record_progression_100_metres_freestyle
% each line in datafile should be similar to this one:
% 1 	 53.46  		Almsick , Franziska van Franziska van Almsick 	 Germany 	01993-01-06 6 January 1993 	World Cup 	China, Shanghai ?  People's Republic of China Shanghai, China 	
% (the '%' sign at the beginning of the line is for matlab remark purposes, should not be on actual .txt file)
% copy the whole table (men long course, short, women long, short) and separate each subtable with a blank line
% 
% if you simply do a ctrl+c copy from the table itself on the wiki page and ctrl+v into notepad, you should 
% hit nearly this format. sometimes you may get a double line for a single entry: to make it a single line,
% just backspace once at the beginning of the second line

%lstyle is a string with color and linestyle data for the plot command (see matlab specs)

% sample call:
% pooldata('WRP100mbreaststroke.txt');

% feel free to modify, copy, redistribute this code without any reference to its author, provided you make 
% some job in transforming wiki table data into graphic data


lstyle={'.-b','.:b','.-r','.:r'};

fid=fopen(datafile,'rt');
ee=1;
ct=1;
ctype=1;
while ee
   a=fgetl(fid);
   ischar(a)
   if ischar(a)
      if ~isempty(a)
	      %warning: the following takes out ':' from string data if time is equal or more than 1'
   	   %this is valid only for the specific format
      	tt=str2num(strrep(a(6:14),':',''));
      	%tt=str2num(strrep(a(1:7),':','')); % use this alternate formula depending on where the time "column" is found on the table
      	tt=floor(tt/100)*60+mod(tt,100);%works out actual seconds
            
      	ti(ct)=tt;%stores time for this entry
      	ii=findstr(a,'-');yr(ct)=str2num(a(ii(1)-4:ii(1)-1));%looks for a year data marker on the string and stores the year (see how this is coded on the .txt file)
	  	   %ii=findstr(a,',');yr(ct)=str2num(a(ii(1)+2:ii(1)+5));%alternate formula depending on how the data is coded (see how this is coded on the .txt file)
      	ct=ct+1;
   	else
         lll=a;
         plot(yr,ti,lstyle{ctype},'linewidth',2)
         hold on
         ctype=ctype+1;ct=1;
         clear yr ti
   	end
   else
      ee=0;
      plot(yr,ti,lstyle{ctype},'linewidth',2)
   end
end

fclose(fid);
grid on
hold on
axis([1900 2015 90 200])
set(gca,'ytick',[90:2:200])
set(gca,'xtick',[1900:5:2015])
set(gca,'YTickLabel',{'90','','','','','100','','','','','110','','','','','(2min)=120','','','','','130','','','','','140','','','','','150','','','','','160','','','','','170','','','','','(3min)=180','','','','','190','','','','','200'})
set(gca,'XTickLabel',{'1900','','1910','','1920','','1930','','1940','','1950','','1960','','1970','','1980','','1990','','2000','','2010',''})

%add these last lines when you're done 
title(datafile(1:end-4))
ylabel('time [s]')
xlabel('year')
%legend('Men long course','Men short course','Women long course','Women short course') %legend depends on the data you put (of course)

Licensing

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

4 April 2010

image/png

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:40, 4 April 2010Thumbnail for version as of 12:40, 4 April 20103,162 × 2,079 (783 KB)Krfx{{Information |Description={{en|1=Graphic data for World Record Progression in Men and Women Swimming 50m-100m-200m Long and Short Course Butterfly-Backstroke-Breaststroke-Freestyle. Original table data retrieved from Wikipedia (including glitches e.g. as

Global file usage

The following other wikis use this file: