انتقل إلى المحتوى

ملف:Mylpale.svg

محتويات الصفحة غير مدعومة بلغات أخرى.
من ويكيبيديا، الموسوعة الحرة

الملف الأصلي(ملف SVG، أبعاده 1٬080 × 540 بكسل، حجم الملف: 34 كيلوبايت)

ملخص

الوصف
Afrikaans: Aantal Afrikaanse Wikipedia Artikels met verloop van tyd
English: Number of Afrikaans Wikipedia articles over time
التاريخ
المصدر عمل شخصي
المؤلف Rooiratel
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from datetime import datetime
from matplotlib.ticker import MultipleLocator

# vars
dt_format = '%Y-%m-%d'

# Initialize lists to store the dates and values
dates = []
values = []

# format of mylpale_data.txt is as follows
# 2001-11-01 1
# 2002-08-01 50
# 2003-04-01 100
# etc.

# Open the text file and read the data
with open('mylpale_data.txt', 'r') as file:
    for line in file:
        # Split the line into date and value
        date_str, value_str = line.strip().split()
        # Convert the date string to a datetime object
        date = datetime.strptime(date_str, dt_format)
        # Convert the value string to an integer
        value = int(value_str)
        # Append the date and value to their respective lists
        dates.append(date)
        values.append(value)

# Create a figure and set the size
fig, ax = plt.subplots(figsize=(12, 6))  # Adjust the width and height as needed

# Plot the data
ax.plot_date(dates, values, 'o-', markersize=5, linewidth=2, color='#0060ad')

# Set the title and labels
ax.set_title("Aantal Afrikaanse Wikipedia Artikels", fontsize=14)
ax.set_xlabel("Datum")
ax.set_ylabel("Aantal Artikels")

# Set the x-axis major ticks to years
ax.xaxis.set_major_locator(mdates.YearLocator())
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y'))

# Set the x-axis range
start_date = datetime.strptime('2001-06-01', dt_format)
end_date = datetime.strptime(f"{datetime.now().year + 2}-01-01", '%Y-%m-%d')  # Use current year + 2 as the end date
ax.set_xlim(start_date, end_date)

# Set y-axis range
ax.set_ylim(0, (values[-1] + 5000))

# Set the y-axis gridlines to every 5000
ax.yaxis.set_major_locator(MultipleLocator(5000))

# Remove the x-axis and y-axis ticks
ax.xaxis.set_tick_params(which='both', bottom=False, top=False, labelbottom=True)
ax.yaxis.set_tick_params(which='both', left=False, right=False, labelleft=True)

# Add a grid
ax.grid(True)

# Add padding to the plot
ax.margins(x=0.1, y=0.1)  # Adjust x and y padding as needed

# Save the plot as an SVG file
plt.savefig("mylpale_fat.svg", format='svg', dpi=1200)

print('Klaar')

To run the above script which generates a fat .svg and to trim out all the crap for the final version of the .svg I use the following Makefile:

pysvg:
	python mylpale.py

shrink: pysvg
	scour -i mylpale_fat.svg -o mylpale.svg --enable-viewboxing --enable-id-stripping \
  --enable-comment-stripping --shorten-ids --indent=none

ترخيص

أنا، صاحب حقوق التأليف والنشر لهذا العمل، أنشر هذا العمل تحت الرخصة التالية:
w:ar:مشاع إبداعي
نسب العمل إلى مُؤَلِّفه الإلزام بترخيص المُشتقات بالمثل
يحقُّ لك:
  • مشاركة العمل – نسخ العمل وتوزيعه وبثُّه
  • إعادة إنتاج العمل – تعديل العمل
حسب الشروط التالية:
  • نسب العمل إلى مُؤَلِّفه – يلزم نسب العمل إلى مُؤَلِّفه بشكل مناسب وتوفير رابط للرخصة وتحديد ما إذا أجريت تغييرات. بالإمكان القيام بذلك بأية طريقة معقولة، ولكن ليس بأية طريقة تشير إلى أن المرخِّص يوافقك على الاستعمال.
  • الإلزام بترخيص المُشتقات بالمثل – إذا أعدت إنتاج المواد أو غيرت فيها، فيلزم أن تنشر مساهماتك المُشتقَّة عن الأصل تحت ترخيص الأصل نفسه أو تحت ترخيص مُتوافِقٍ معه.

الشروحات

أضف شرحاً من سطر واحد لما يُمثِّله هذا الملف

العناصر المصورة في هذا الملف

يُصوِّر

١٥ يونيو 2018

تاريخ الملف

اضغط على زمن/تاريخ لرؤية الملف كما بدا في هذا الزمن.

(الأحدث | الأقدم) عرض (أحدث 10  | ) (10 | 20 | 50 | 100 | 250 | 500).
زمن/تاريخصورة مصغرةالأبعادمستخدمتعليق
حالي20:44، 1 مارس 2024تصغير للنسخة بتاريخ 20:44، 1 مارس 20241٬080 × 540 (34 كيلوبايت)RooiratelTot 2024-02-29
11:17، 29 أكتوبر 2021تصغير للنسخة بتاريخ 11:17، 29 أكتوبر 2021512 × 219 (19 كيلوبايت)Rooiratelfix axis
11:14، 29 أكتوبر 2021تصغير للنسخة بتاريخ 11:14، 29 أكتوبر 2021512 × 219 (22 كيلوبايت)Rooiratel100000
06:12، 29 يناير 2021تصغير للنسخة بتاريخ 06:12، 29 يناير 20211٬400 × 600 (22 كيلوبايت)Rooiratel96000
06:51، 30 يوليو 2020تصغير للنسخة بتاريخ 06:51، 30 يوليو 20201٬400 × 600 (22 كيلوبايت)RooiratelFixed x-axis scaling and values.
11:44، 27 يوليو 2020تصغير للنسخة بتاريخ 11:44، 27 يوليو 20201٬400 × 600 (24 كيلوبايت)Rooiratel92000 (also fixed xtic intervals)
18:34، 22 يناير 2020تصغير للنسخة بتاريخ 18:34، 22 يناير 20201٬400 × 600 (33 كيلوبايت)PynappelVergroot x- en y-asse
18:12، 22 يناير 2020تصغير للنسخة بتاريخ 18:12، 22 يناير 20201٬400 × 600 (36 كيلوبايت)Pynappel88 0000
04:52، 19 ديسمبر 2019تصغير للنسخة بتاريخ 04:52، 19 ديسمبر 20191٬400 × 600 (22 كيلوبايت)RooiratelMaak x-as langer.
23:14، 17 ديسمبر 2019تصغير للنسخة بتاريخ 23:14، 17 ديسمبر 20191٬400 × 600 (35 كيلوبايت)Pynappel87000
(الأحدث | الأقدم) عرض (أحدث 10  | ) (10 | 20 | 50 | 100 | 250 | 500).

الصفحة التالية تستخدم هذا الملف:

الاستخدام العالمي للملف

الويكيات الأخرى التالية تستخدم هذا الملف:

بيانات وصفية