Difference between revisions of "Python/C2/Other-types-of-plots/Gujarati"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{| border=1 !Visual Cue !Narration |- | 0:01 | Hello Friends and welcome to the tutorial on Other types of plots |- | 0:06 | Till now we have seen only one kind of plotting. |-…')
 
Line 4: Line 4:
 
|-
 
|-
 
| 0:01
 
| 0:01
| Hello Friends and welcome to the tutorial on Other types of plots
+
| નમસ્કાર મિત્રો '''Other types of plots''' પરનાં ટ્યુટોરીયલમાં સ્વાગત છે.
  
 
|-
 
|-
 
| 0:06
 
| 0:06
| Till now we have seen only one kind of plotting.
+
| હજુ સુધી આપણે ફક્ત એક પ્રકારનાં આલેખને દોરવાનું જોયું.  
  
 
|-
 
|-
 
| 0:10
 
| 0:10
| Hence in this tutorial we will be looking at some more kinds of plots.
+
| એટલા માટે આ ટ્યુટોરીયલમાં આપણે કેટલાક વધુ પ્રકારનાં આલેખો તરફ જોઈશું.
  
 
|-
 
|-
Line 18: Line 18:
 
|At the end of this tutorial, you will be able to
 
|At the end of this tutorial, you will be able to
  
# Create scatter plot
+
અને આ ટ્યુટોરીયલની અંતમાં, તમે આપેલ વિશે સમર્થ હશો 
# Create pie charts
+
# Create bar charts
+
# Create log-log plots
+
# Use the matplotlib help
+
  
 +
1. સ્કેટર આલેખ બનાવવું
 +
 +
2. પાઈ ચાર્ટો બનાવવા
 +
 +
3. બાર ચાર્ટો બનાવવા
 +
 +
4. લોગ-લોગ આલેખો બનાવવા 
 +
 +
5. '''matplotlib''' મદદનો ઉપયોગ કરવો
 
|-
 
|-
 
|0:29
 
|0:29
| So let us begin with scatter plot
+
|તો ચાલો સ્કેટર આલેખથી શરૂ કરીએ
  
 
|-
 
|-
 
| 0:33
 
| 0:33
| Before beginning this tutorial,we would suggest you to complete the tutorial on "Loading data from files" and "Plotting data".
+
| આ ટ્યુટોરીયલ શરૂ કરીએ એ પહેલા, અમે તમને '''"Loading data from files"''' અને '''"Plotting data"''' પરનાં ટ્યુટોરીયલ પૂર્ણ કરવાનું આગ્રહ કરીશું.
  
 
|-
 
|-
 
| 0:42
 
| 0:42
| In a scatter plot, the data is displayed as a collection of points, where each point determines it's position on the horizontal axis and the vertical axis respectively.
+
| સ્કેટર આલેખમાં, ડેટા બિંદુઓનાં સંગ્રહ તરીકે પ્રદર્શિત થાય છે. જેમાં દરેક બિંદુ તેની સ્થિતિને અનુક્રમે આડી ધરી અને ઉભી ધરી પર નક્કી કરે છે.
  
 
|-
 
|-
 
| 0:54
 
| 0:54
| This kind of plot is also called a scatter chart, a scatter diagram or a scatter graph.
+
| આ પ્રકારનાં આલેખને સ્કેટર ચાર્ટ, સ્કેટર ડાયાગ્રામ અથવા સ્કેટર ગ્રાફ પણ કહેવાય છે.
  
 
|-
 
|-
 
| 1:01
 
| 1:01
| Before we proceed further , start your IPython interpreter
+
|આપણે આગળ વધીએ એ પહેલા, તમારા '''IPython''' ઇન્ટરપ્રીટરને ચાલુ કરો
  
 
|-
 
|-
 
|1:06
 
|1:06
|So type ipython hypen pylab
+
|તો ટાઈપ કરો '''ipython હાયફન pylab'''
  
 
|-
 
|-
 
| 1:13
 
| 1:13
| Plot a scatter plot showing the percentage profit of a company A from the year 2000-2010.
+
| '''કંપની A''' નાં નફાની ટકાવારીને વર્ષ '''2000-2010''' સુધી દર્શાવતો એક સ્કેટર આલેખ આલેખો.  
  
 
|-
 
|-
 
| 1:22
 
| 1:22
| The data for the same is available in the file company-a-data.txt.
+
| '''કંપની A''' નાં નફાની ટકાવારીને વર્ષ '''2000-2010''' સુધી દર્શાવતો એક સ્કેટર આલેખ આલેખો.  
  
 
|-
 
|-
 
|1:33
 
|1:33
|Type cat space slash home slash fossee bacslash other-plot slash company-a-data.txt (enter)
+
|ટાઈપ કરો '''cat સ્પેસ સ્લેશ home સ્લેશ fossee સ્લેશ other-plot સ્લેશ company-a-data.txt''' '''(એન્ટર)''' દબાવો
  
 
|-
 
|-
 
| 1:50
 
| 1:50
| The data file has two lines with a set of values in each line, the first line representing years and the second line representing the profit percentages.
+
| દરેક લાઈનમાં વેલ્યુઓનાં સેટ સહીત ડેટા ફાઈલ બે લાઈનો ધરાવે છે, પહેલી લાઈન વર્ષને રજુ કરે છે અને બીજી લાઈન નફા ટકાવારીને રજુ કરે છે.
  
 
|-
 
|-
 
|2:02
 
|2:02
| To produce the scatter plot, we first need to load the data from the file using loadtxt command.
+
| સ્કેટર આલેખનાં નિર્માણ માટે, આપણને પહેલા '''loadtxt''' આદેશનાં મદદથી ફાઈલમાંથી ડેટા લોડ કરવાની જરૂર છે.  
  
 
|-
 
|-
 
|2:10
 
|2:10
|Type year,profit = loadtxt within bracket in single quote slash home slash fossee slash other-plot slash company-a-data.txt comma dtype=type in bracket int()closing brackets hit enter
+
|ટાઈપ કરો ''' year,profit = loadtxt કૌંસમાં એકલ અવતરણમાં સ્લેશ home સ્લેશ fossee સ્લેશ other-plot સ્લેશ company-a-data.txt અલ્પવિરામ dtype=type કૌંસમાં int()બંધ કૌંસ''' '''enter''' દબાવો
 
+
  
 
|-
 
|-
 
| 2:52
 
| 2:52
| By default loadtxt converts the value to float.
+
| '''loadtxt''' વેલ્યુને મૂળભૂત રીતે ફ્લોટમાં પરિવર્તિત કરે છે.
  
 
|-
 
|-
 
| 2:57
 
| 2:57
| The dtype=type within bracket int() closing bracket argument in loadtxt converts the value to integer, as we require the data as integer further in the tutorial.
+
| '''loadtxt''' માં આર્ગ્યુંમેંટ '''dtype=type કૌંસમાં int() બંધ કૌંસ''' વેલ્યુને ઇન્ટીજરમાં પરિવર્તિત કરે છે, કારણ કે આપણને આગળ ટ્યુટોરીયલમાં ડેટા ઇન્ટીજર તરીકે જોઈએ છે.  
  
 
|-
 
|-
 
| 3:11
 
| 3:11
| Now in-order to generate the scatter graph we will use the function scatter()closing brackets
+
| હવે સ્કેટર ગ્રાફને નિર્માણ કરવા માટે આપણે '''scatter()''' બંધ કૌંસ ફંક્શનનો ઉપયોગ કરીશું
|-
+
 
 
|3:18
 
|3:18
|Type scatter within closing bracket year comma profit and hit enter
+
|ટાઈપ કરો '''scatter બંધ કૌંસમાં year અલ્પવિરામ profit''' અને '''enter''' દબાવો
  
 
|-
 
|-
 
| 3:32
 
| 3:32
| Notice that we passed two arguments to scatter() function, first one the values in x-coordinate, year, and the other the values in y-coordinate, the profit percentage.
+
| નોંધ લો કે આપણે '''scatter()''' ફંક્શનમાં બે આર્ગ્યુંમેંટો પસાર કરી છે, પહેલી X-ધરીમાં વેલ્યુ છે, '''વર્ષ''', અને બીજી Y-ધરીમાં વેલ્યુ છે, '''નફો ટકાવારી'''.
  
 
|-
 
|-
 
| 3:57
 
| 3:57
| Plot a scatter plot of the same data in company-a-data.txt with red diamond markers.
+
| લાલ હીરા ચિન્હો સાથે '''company-a-data.txt''' માં એજ ડેટાનો સ્કેટર આલેખ બનાવો.
  
 
|-
 
|-
 
| 4:09
 
| 4:09
| Pause the video here, try out the following exercise and resume the video.
+
|અહીં વિડીઓને અટકાવો, આપેલ અભ્યાસ પ્રયાસ કરો અને વિડીઓ ફરીથી ચાલુ કરો.
  
 
|-
 
|-
 
| 4:17
 
| 4:17
|Now let us see another kind of plot, the pie chart, for the same data.
+
|હવે ચાલો બીજા પ્રકારનો આલેખ જોઈએ, એજ ડેટા માટે, એક પાઈ ચાર્ટ.  
  
 
|-
 
|-
 
| 4:40
 
| 4:40
| A pie chart or a circle graph is a circular chart divided into sectors, illustrating proportion.
+
|પાઈ ચાર્ટ અથવા વર્તુળ આલેખ એ વિભાગોમાં વહેંચાયેલ, પ્રમાણ દર્શાવનાર, એક વર્તુળાકાર ચાર્ટ છે.
  
 
|-
 
|-
 
| 4:49
 
| 4:49
| Plot a pie chart representing the profit percentage of company A, with the same data from file company-a-data.tx.
+
| '''company-a-data.txt''' ફાઈલમાંથી સમાન ડેટા સાથે, કંપની '''A''' ની નફા ટકાવારીને રજુ કરતો એક પાઈ ચાર્ટ આલેખો.
  
 
|-
 
|-
 
| 5:00
 
| 5:00
|So let us reuse the data we have loaded from the file previously.
+
|તો ચાલો એજ ડેટાને ફરીથી વાપરીએ જે પહેલા આપણે ફાઈલમાંથી લોડ કર્યો હતો.
  
 
|-
 
|-
 
| 5:11
 
| 5:11
| We can plot the pie chart using the function pie()closing brackets
+
| '''pie()''' બંધ કૌંસ ફંક્શનનો ઉપયોગ કરીને આપણે પાઈ ચાર્ટ આલેખી શકીએ છીએ
  
 
|-
 
|-
 
|5:15
 
|5:15
|So Type pie within bracket profit comma labels=year
+
|તો ટાઈપ કરો '''pie કૌંસમાં profit અલ્પવિરામ labels=year'''
  
  
 
|-
 
|-
 
| 5:29
 
| 5:29
| Notice that we passed two arguments to the function pie().
+
| નોંધ લો કે આપણે ફંક્શન '''pie()''' માં બે આર્ગ્યુંમેંટો પસાર કરી છે.
  
 
|-
 
|-
 
| 5:33
 
| 5:33
| First one the values and the next one the set of labels to be used in the pie chart.
+
|પહેલી એ વેલ્યુઓ છે અને પછીની એ પાઈ ચાર્ટમાં વાપરવામાં આવનાર લેબલોનાં સેટ છે.
  
 
|-
 
|-
 
| 5:38
 
| 5:38
| Plot a pie chart with the same data with red colors for each wedges as white, red, black, magenta,yellow, blue, green, cyan, yellow, magenta and blue respectively.
+
| સમાન ડેટા સાથે એક પાઈ ચાર્ટ આલેખો દરેક વેજીસ માટે અનુક્રમે સફેદ, લાલ, કાળો, ગુલાબી, પીળો, ભૂરો, લીલો, શીયાન, પીળો, ગુલાબી અને ભૂરો રંગ આપો.  
  
 
|-
 
|-
 
| 5:58
 
| 5:58
| Pause the video here, try out the following exercise and resume the video.
+
| અહીં વિડીઓને અટકાવો, આપેલ અભ્યાસ પ્રયાસ કરો અને વિડીઓ ફરીથી ચાલુ કરો.
  
 
|-
 
|-
 
|  6:05
 
|  6:05
| Now let us move on to the bar charts.
+
| હવે ચાલો બાર ચાર્ટ પર જઈએ.
  
 
|-
 
|-
 
| 6:08
 
| 6:08
| A bar chart or bar graph is a chart with rectangular bars with lengths proportional to the values that they represent.
+
| બાર ચાર્ટ અથવા કે બાર ગ્રાફ એ લંબચોરસ સ્તંભો ધરાવતો એક ચાર્ટ છે જેમાં સ્તંભોની લંબાઈ રજુ કરવામાં આવનાર વેલ્યુઓનું પ્રમાણ દર્શાવે છે.  
  
 
|-
 
|-
 
| 6:19
 
| 6:19
| Plot a bar chart representing the profit percentage of company A, with the same data from file company-a-data.txt.
+
| ''company-a-data.txt''' ફાઈલમાંથી સમાન ડેટા સાથે કંપની '''A''' ની નફા ટકાવારીને રજુ કરતો એક બાર ચાર્ટ આલેખો.
  
 
|-
 
|-
 
| 6:30
 
| 6:30
|So let us reuse the data we have loaded from the file previously.
+
|તો ચાલો એજ ડેટાને ફરીથી વાપરીએ જે પહેલા આપણે ફાઈલમાંથી લોડ કર્યો હતો.  
  
 
|-
 
|-
 
| 6:34
 
| 6:34
| We can plot the bar chart using the function bar() and hit enter.
+
| '''bar()''' ફંક્શનનો ઉપયોગ કરીને આપણે બાર ચાર્ટ આલેખી શકીએ છીએ અને '''enter''' દબાવો.
  
 
|-
 
|-
 
|6:44
 
|6:44
|So inside that bracket you can put bar , year ,comma profit
+
|તો તે કૌંસની અંદર તમે મૂકી શકો છો '''bar કૌંસમાં year અલ્પવિરામ profit'''
  
 
|-
 
|-
 
| 6:52
 
| 6:52
| Note that the function bar()needs at least two arguments one the values in x-coordinate and the other values in y-coordinate which is used to determine the height of the bars.
+
| નોંધ લો કે ફંક્શન '''bar()''' ને લગભગ બે આર્ગ્યુંમેંટો જોઈએ છે એક એ X-ધરી પરની વેલ્યુ છે અને બીજી એ Y-ધરી પરની વેલ્યુ છે જે સ્તંભોની ઉંચાઈ નક્કી કરવા માટે ઉપયોગમાં આવે છે.  
  
 
|-
 
|-
 
| 7:05
 
| 7:05
| Plot a bar chart which is not filled and which is hatched with 45 slanting lines as shown in the image.
+
|એક બાર ચાર્ટ બનાવો જે ભરેલ ન હોય અને જે ઈમેજમાં બતાવ્યા પ્રમાણે ૪૫ ડીગ્રી ત્રાસી લાઈનોથી ભરાયો હોય.  
  
 
|-
 
|-
 
| 7:17
 
| 7:17
|The data for the chart may be obtained from the file company-a-data.txt
+
|ચાર્ટ માટે ડેટા '''company-a-data.txt''' ફાઈલમાંથી મેળવી શકાય છે. 
  
 
|-
 
|-
 
|7:26
 
|7:26
|Type bar within bracket year comma profit comma fill=False comma hatch= within single quote slashhit enter
+
|ટાઈપ કરો '''bar કૌંસમાં year અલ્પવિરામ profit અલ્પવિરામ fill=False અલ્પવિરામ hatch= એકલ અવતરણમાં સ્લેશ''' '''enter''' દબાવો
  
 
|-
 
|-
 
| 8:05
 
| 8:05
| Now let us move on to the log-log plot.
+
| હવે ચાલો લોગ-લોગ આલેખ પર જઈએ.  
  
 
|-
 
|-
 
| 8:10
 
| 8:10
| A log-log graph or a log-log plot is a two-dimensional graph of numerical data that uses logarithmic scales on both the horizontal and vertical axes.
+
| લોગ-લોગ ગ્રાફ અથવા કે લોગ-લોગ આલેખ એ આંકડાકીય ડેટાનો એક બે-આયામી ગ્રાફ છે જે બંને આડી અને ઉભી ધરીઓ પર લઘુગુણકીય માપપટ્ટી ઉપયોગમાં લે છે. es.
  
 
|-
 
|-
 
| 8:24
 
| 8:24
| Because of the nonlinear scaling of the axes, a function of the form y = ax b will appear as a straight line on a log-log graph
+
| ધરીઓનાં અરૈખિક માપનનાં લીધે, '''y = ax^b''' સ્વરૂપનું ફંક્શન લોગ-લોગ આલેખ પર સીધી લાઈનનાં રૂપમાં પ્રદર્શિત થશે
  
 
|-
 
|-
 
|  8:38
 
|  8:38
| Plot a ''log-log'' chart of y=5 into x3for x from 1-20.
+
| '''x માટે 1-20 નો y=5 ગુણ્યા x3''' નો લોગ-લોગ ચાર્ટ આલેખો.  
  
 
|-
 
|-
 
| 8:49
 
| 8:49
| Before we actually plot let us calculate the points needed for that.
+
| એ પહેલા કે આપણે વાસ્તવમાં આલેખવાનું શરૂ કરીએ ચાલો તે માટે જોઈતા પોઈન્ટો ગણતરી કરીએ.  
  
 
|-
 
|-
 
|8:54
 
|8:54
|x = linspace within brackets 1 comma 20 comma 100
+
|'''x = linspace કૌંસમાં 1 અલ્પવિરામ 20 અલ્પવિરામ 100'''
y = 5 into x into 3
+
 
 +
'''y = 5 ગુણ્યા x ગુણ્યા 3'''
  
 
|-
 
|-
 
| 9:23
 
| 9:23
| Here is the syntax of the log-log function.
+
| લોગ-લોગ ફંક્શનની વાક્યરચના આ રહ્યી.
  
 
|-
 
|-
 
| 9:28
 
| 9:28
| Now we can plot the log-log chart using loglog()function,
+
|હવે આપણે '''loglog()''' ફંક્શનનાં ઉપયોગ વડે લોગ-લોગ ચાર્ટ આલેખી શકીએ છીએ,  
  
 
|-
 
|-
 
|9:34
 
|9:34
|Type loglog within brackets x comma y hit enter
+
|ટાઈપ કરો '''loglog કૌંસમાં x અલ્પવિરામ y''' '''enter''' દબાવો
  
 
|-
 
|-
 
| 9:48
 
| 9:48
| To understand the difference between a normal plot and a log-log plot let us create another plot using the function plot.
+
|સાદા આલેખ અને લોગ-લોગ આલેખ વચ્ચે તફાવત સમજવા માટે ચાલો ફંક્શન '''plot''' નાં ઉપયોગ વડે બીજો એક આલેખ બનાવીએ.
  
 
|-
 
|-
 
|9:57
 
|9:57
|figure within brackets 2 THen type plot within brackets x comma y
+
|'''figure કૌંસમાં 2''' ત્યારબાદ ટાઈપ કરો '''plot કૌંસમાં x અલ્પવિરામ y'''
  
 
|-
 
|-
 
| 10:24
 
| 10:24
| The difference is clear.So that was log-log() plot.
+
| તફાવત સ્પષ્ટ છે. તો આ હતો '''log-log()''' આલેખ.  
  
 
|-
 
|-
 
| 10:33
 
| 10:33
| Now we will see few more plots and also see how to access help of matplotlib over the Internet.
+
|હવે આપણે થોડા વધુ આલેખો જોઈશું અને એ સાથે જ જોઈશું કે ઇન્ટરનેટ પર '''matplotlib''' ની મદદ કેવી રીતે એક્સેસ કરવી.
  
 
|-
 
|-
 
| 10:43
 
| 10:43
|Help about matplotlib can be obtained from matplotlib.sourceforge.net/contents.html
+
|'''matplotlib''' વિશે મદદ આપેલ વેબસાઈટથી મેળવી શકાય છે
  
 
|-
 
|-
 
| 10:55
 
| 10:55
|More plots can be seen at matplotlib.sourceforge.net slash users slash screenshots.html and also at matplotlib.sourceforge.net slash gallery.html
+
|વધુ આલેખો '''matplotlib.sourceforge.net સ્લેશ users સ્લેશ screenshots.html અને સાથે જ matplotlib.sourceforge.net સ્લેશ gallery.html ''' પર પણ જોઈ શકાય છે.
  
 
|-
 
|-
 
| 11:13
 
| 11:13
| This brings us to the end of this tutorial. In this tutorial we learnt to,
+
| અહીં આ ટ્યુટોરીયલનો અંત થાય છે. આ ટ્યુટોરીયલમાં આપણે શીખ્યા,
  
 
|-
 
|-
 
| 11:20
 
| 11:20
| 1. Plot a scatter plot using scatter() function
+
| . '''scatter()''' ફંક્શનનાં ઉપયોગ વડે સ્કેટર આલેખ આલેખવો
  
 
|-
 
|-
 
| 11:22
 
| 11:22
| 2. Plot a pie chart using pie() function
+
| . '''pie()''' ફંક્શનનાં ઉપયોગ વડે પાઈ ચાર્ટ આલેખવો
  
 
|-
 
|-
 
| 11:25
 
| 11:25
| 3. Plot a bar chart using bar() function
+
| . '''bar()''' ફંક્શનનાં ઉપયોગ વડે બાર ચાર્ટ આલેખવો
  
 
|-
 
|-
 
| 11:28
 
| 11:28
| 4. Plot a log-log graph using loglog() function
+
| . '''loglog()''' ફંક્શનનાં ઉપયોગ વડે લોગ-લોગ ગ્રાફ આલેખવો
  
 
|-
 
|-
 
| 11:33
 
| 11:33
| 5. Access the matplotlib online help.Thank you.
+
| . '''matplotlib''' ઓનલાઈન મદદ એક્સેસ કરવી. આભાર.  
  
 
|-
 
|-
 
| 11:42
 
| 11:42
|So there are few some self assessment questions for you to solve.
+
|તો તમારી માટે ઉકેલવા હેતુ થોડા વધુ સ્વ:આકારણી પ્રશ્નો છે.
  
 
|-
 
|-
 
| 11:46
 
| 11:46
|1. scatter x comma y comma  color=blue marker= d and plot x comma y comma color=b comma marker= d) does exactly the same.
+
|. '''scatter x અલ્પવિરામ y અલ્પવિરામ color=blue marker= d અને plot x અલ્પવિરામ y અલ્પવિરામ color=b અલ્પવિરામ marker= d)''' આ એકસમાન છે.
  
 
|-
 
|-
 
| 12:04
 
| 12:04
| Is True or False?
+
| આ '''True''' છે કે '''False'''?
  
 
|-
 
|-
 
| 12:07
 
| 12:07
| 2. What statement can be issued to generate a bar chart with vertical line hatching.
+
|. ઉભી ત્રાસી લાઈનો સાથે બાર ચાર્ટ નિર્માણ કરવા માટે કયો સ્ટેટમેંટ રજુ કરી શકાય છે.  
  
 
|-
 
|-
 
| 12:15
 
| 12:15
| 1.bar within function  x comma y comma color=in single quote w comma hatch= slash
+
|. '''bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ color=એકલ અવતરણમાં w અલ્પવિરામ hatch= એકલ અવતરણમાં સ્લેશ'''
  
 
|-
 
|-
 
| 12:27
 
| 12:27
|2. bar within bracket x comma y comma fill=False comma hatch=slash  slash
+
|. '''bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ fill=False અલ્પવિરામ hatch= એકલ અવતરણમાં સ્લેશ સ્લેશ'''
  
 
|-
 
|-
 
| 12:38
 
| 12:38
| bar within bracket x comma y comma fill=False comma hatch=in single quote|
+
| ૩. '''bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ fill=False અલ્પવિરામ hatch= એકલ અવતરણમાં બાર'''
  
 
|-
 
|-
 
| 12:52
 
| 12:52
| bar within bracket x comma y comma color= within quote w comma hatch=single quote
+
| ૪. '''bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ color= એકલ અવતરણમાં w અલ્પવિરામ hatch= એકલ અવતરણ'''
  
 
|-
 
|-
 
| 13:02
 
| 13:02
| And now the answers,
+
| અને હવે જવાબો,  
  
 
|-
 
|-
 
| 13:06
 
| 13:06
| 1. False.
+
| . '''False'''.  
  
 
|-
 
|-
 
| 13:9
 
| 13:9
| Both functions do not produce the same kind of plot.
+
| બંને ફંક્શનો એક પ્રકારનાં આલેખને નિર્માણ કરતા નથી.  
  
 
|-
 
|-
 
| 13:13
 
| 13:13
| 2.bar x comma y comma fill=False comma hatch=bar is the correct option to generate a bar chart with vertical line hatching.
+
| . '''bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ fill=False અલ્પવિરામ hatch= એકલ અવતરણમાં બાર''' આ ઉભી ત્રાસી લાઈનો સાથે બાર ચાર્ટનું નિર્માણ કરવા માટે યોગ્ય વિકલ્પ છે.
 
+
 
|-
 
|-
 
| 13:31
 
| 13:31
| Hope you have enjoyed this tutorial and found it useful.
+
|આશા રાખું છું કે તમને આ ટ્યુટોરીયલ ગમ્યું અને તમને તે ઉપયોગી રહ્યું.
  
 
|-
 
|-
 
|13:34
 
|13:34
|Thank you!
+
|આભાર!

Revision as of 17:00, 17 October 2013

Visual Cue Narration
0:01 નમસ્કાર મિત્રો Other types of plots પરનાં ટ્યુટોરીયલમાં સ્વાગત છે.
0:06 હજુ સુધી આપણે ફક્ત એક પ્રકારનાં આલેખને દોરવાનું જોયું.
0:10 એટલા માટે આ ટ્યુટોરીયલમાં આપણે કેટલાક વધુ પ્રકારનાં આલેખો તરફ જોઈશું.
0:16 At the end of this tutorial, you will be able to

અને આ ટ્યુટોરીયલની અંતમાં, તમે આપેલ વિશે સમર્થ હશો

1. સ્કેટર આલેખ બનાવવું

2. પાઈ ચાર્ટો બનાવવા

3. બાર ચાર્ટો બનાવવા

4. લોગ-લોગ આલેખો બનાવવા

5. matplotlib મદદનો ઉપયોગ કરવો

0:29 તો ચાલો સ્કેટર આલેખથી શરૂ કરીએ
0:33 આ ટ્યુટોરીયલ શરૂ કરીએ એ પહેલા, અમે તમને "Loading data from files" અને "Plotting data" પરનાં ટ્યુટોરીયલ પૂર્ણ કરવાનું આગ્રહ કરીશું.
0:42 સ્કેટર આલેખમાં, ડેટા બિંદુઓનાં સંગ્રહ તરીકે પ્રદર્શિત થાય છે. જેમાં દરેક બિંદુ તેની સ્થિતિને અનુક્રમે આડી ધરી અને ઉભી ધરી પર નક્કી કરે છે.
0:54 આ પ્રકારનાં આલેખને સ્કેટર ચાર્ટ, સ્કેટર ડાયાગ્રામ અથવા સ્કેટર ગ્રાફ પણ કહેવાય છે.
1:01 આપણે આગળ વધીએ એ પહેલા, તમારા IPython ઇન્ટરપ્રીટરને ચાલુ કરો
1:06 તો ટાઈપ કરો ipython હાયફન pylab
1:13 કંપની A નાં નફાની ટકાવારીને વર્ષ 2000-2010 સુધી દર્શાવતો એક સ્કેટર આલેખ આલેખો.
1:22 કંપની A નાં નફાની ટકાવારીને વર્ષ 2000-2010 સુધી દર્શાવતો એક સ્કેટર આલેખ આલેખો.
1:33 ટાઈપ કરો cat સ્પેસ સ્લેશ home સ્લેશ fossee સ્લેશ other-plot સ્લેશ company-a-data.txt (એન્ટર) દબાવો
1:50 દરેક લાઈનમાં વેલ્યુઓનાં સેટ સહીત ડેટા ફાઈલ બે લાઈનો ધરાવે છે, પહેલી લાઈન વર્ષને રજુ કરે છે અને બીજી લાઈન નફા ટકાવારીને રજુ કરે છે.
2:02 સ્કેટર આલેખનાં નિર્માણ માટે, આપણને પહેલા loadtxt આદેશનાં મદદથી ફાઈલમાંથી ડેટા લોડ કરવાની જરૂર છે.
2:10 ટાઈપ કરો year,profit = loadtxt કૌંસમાં એકલ અવતરણમાં સ્લેશ home સ્લેશ fossee સ્લેશ other-plot સ્લેશ company-a-data.txt અલ્પવિરામ dtype=type કૌંસમાં int()બંધ કૌંસ enter દબાવો
2:52 loadtxt વેલ્યુને મૂળભૂત રીતે ફ્લોટમાં પરિવર્તિત કરે છે.
2:57 loadtxt માં આર્ગ્યુંમેંટ dtype=type કૌંસમાં int() બંધ કૌંસ વેલ્યુને ઇન્ટીજરમાં પરિવર્તિત કરે છે, કારણ કે આપણને આગળ ટ્યુટોરીયલમાં ડેટા ઇન્ટીજર તરીકે જોઈએ છે.
3:11 હવે સ્કેટર ગ્રાફને નિર્માણ કરવા માટે આપણે scatter() બંધ કૌંસ ફંક્શનનો ઉપયોગ કરીશું 3:18 ટાઈપ કરો scatter બંધ કૌંસમાં year અલ્પવિરામ profit અને enter દબાવો
3:32 નોંધ લો કે આપણે scatter() ફંક્શનમાં બે આર્ગ્યુંમેંટો પસાર કરી છે, પહેલી X-ધરીમાં વેલ્યુ છે, વર્ષ, અને બીજી Y-ધરીમાં વેલ્યુ છે, નફો ટકાવારી.
3:57 લાલ હીરા ચિન્હો સાથે company-a-data.txt માં એજ ડેટાનો સ્કેટર આલેખ બનાવો.
4:09 અહીં વિડીઓને અટકાવો, આપેલ અભ્યાસ પ્રયાસ કરો અને વિડીઓ ફરીથી ચાલુ કરો.
4:17 હવે ચાલો બીજા પ્રકારનો આલેખ જોઈએ, એજ ડેટા માટે, એક પાઈ ચાર્ટ.
4:40 પાઈ ચાર્ટ અથવા વર્તુળ આલેખ એ વિભાગોમાં વહેંચાયેલ, પ્રમાણ દર્શાવનાર, એક વર્તુળાકાર ચાર્ટ છે.
4:49 company-a-data.txt ફાઈલમાંથી સમાન ડેટા સાથે, કંપની A ની નફા ટકાવારીને રજુ કરતો એક પાઈ ચાર્ટ આલેખો.
5:00 તો ચાલો એજ ડેટાને ફરીથી વાપરીએ જે પહેલા આપણે ફાઈલમાંથી લોડ કર્યો હતો.
5:11 pie() બંધ કૌંસ ફંક્શનનો ઉપયોગ કરીને આપણે પાઈ ચાર્ટ આલેખી શકીએ છીએ
5:15 તો ટાઈપ કરો pie કૌંસમાં profit અલ્પવિરામ labels=year


5:29 નોંધ લો કે આપણે ફંક્શન pie() માં બે આર્ગ્યુંમેંટો પસાર કરી છે.
5:33 પહેલી એ વેલ્યુઓ છે અને પછીની એ પાઈ ચાર્ટમાં વાપરવામાં આવનાર લેબલોનાં સેટ છે.
5:38 સમાન ડેટા સાથે એક પાઈ ચાર્ટ આલેખો દરેક વેજીસ માટે અનુક્રમે સફેદ, લાલ, કાળો, ગુલાબી, પીળો, ભૂરો, લીલો, શીયાન, પીળો, ગુલાબી અને ભૂરો રંગ આપો.
5:58 અહીં વિડીઓને અટકાવો, આપેલ અભ્યાસ પ્રયાસ કરો અને વિડીઓ ફરીથી ચાલુ કરો.
6:05 હવે ચાલો બાર ચાર્ટ પર જઈએ.
6:08 બાર ચાર્ટ અથવા કે બાર ગ્રાફ એ લંબચોરસ સ્તંભો ધરાવતો એક ચાર્ટ છે જેમાં સ્તંભોની લંબાઈ રજુ કરવામાં આવનાર વેલ્યુઓનું પ્રમાણ દર્શાવે છે.
6:19 company-a-data.txt' ફાઈલમાંથી સમાન ડેટા સાથે કંપની A ની નફા ટકાવારીને રજુ કરતો એક બાર ચાર્ટ આલેખો.
6:30 તો ચાલો એજ ડેટાને ફરીથી વાપરીએ જે પહેલા આપણે ફાઈલમાંથી લોડ કર્યો હતો.
6:34 bar() ફંક્શનનો ઉપયોગ કરીને આપણે બાર ચાર્ટ આલેખી શકીએ છીએ અને enter દબાવો.
6:44 તો તે કૌંસની અંદર તમે મૂકી શકો છો bar કૌંસમાં year અલ્પવિરામ profit
6:52 નોંધ લો કે ફંક્શન bar() ને લગભગ બે આર્ગ્યુંમેંટો જોઈએ છે એક એ X-ધરી પરની વેલ્યુ છે અને બીજી એ Y-ધરી પરની વેલ્યુ છે જે સ્તંભોની ઉંચાઈ નક્કી કરવા માટે ઉપયોગમાં આવે છે.
7:05 એક બાર ચાર્ટ બનાવો જે ભરેલ ન હોય અને જે ઈમેજમાં બતાવ્યા પ્રમાણે ૪૫ ડીગ્રી ત્રાસી લાઈનોથી ભરાયો હોય.
7:17 ચાર્ટ માટે ડેટા company-a-data.txt ફાઈલમાંથી મેળવી શકાય છે.
7:26 ટાઈપ કરો bar કૌંસમાં year અલ્પવિરામ profit અલ્પવિરામ fill=False અલ્પવિરામ hatch= એકલ અવતરણમાં સ્લેશ enter દબાવો
8:05 હવે ચાલો લોગ-લોગ આલેખ પર જઈએ.
8:10 લોગ-લોગ ગ્રાફ અથવા કે લોગ-લોગ આલેખ એ આંકડાકીય ડેટાનો એક બે-આયામી ગ્રાફ છે જે બંને આડી અને ઉભી ધરીઓ પર લઘુગુણકીય માપપટ્ટી ઉપયોગમાં લે છે. es.
8:24 ધરીઓનાં અરૈખિક માપનનાં લીધે, y = ax^b સ્વરૂપનું ફંક્શન લોગ-લોગ આલેખ પર સીધી લાઈનનાં રૂપમાં પ્રદર્શિત થશે
8:38 x માટે 1-20 નો y=5 ગુણ્યા x3 નો લોગ-લોગ ચાર્ટ આલેખો.
8:49 એ પહેલા કે આપણે વાસ્તવમાં આલેખવાનું શરૂ કરીએ ચાલો તે માટે જોઈતા પોઈન્ટો ગણતરી કરીએ.
8:54 x = linspace કૌંસમાં 1 અલ્પવિરામ 20 અલ્પવિરામ 100

y = 5 ગુણ્યા x ગુણ્યા 3

9:23 લોગ-લોગ ફંક્શનની વાક્યરચના આ રહ્યી.
9:28 હવે આપણે loglog() ફંક્શનનાં ઉપયોગ વડે લોગ-લોગ ચાર્ટ આલેખી શકીએ છીએ,
9:34 ટાઈપ કરો loglog કૌંસમાં x અલ્પવિરામ y enter દબાવો
9:48 સાદા આલેખ અને લોગ-લોગ આલેખ વચ્ચે તફાવત સમજવા માટે ચાલો ફંક્શન plot નાં ઉપયોગ વડે બીજો એક આલેખ બનાવીએ.
9:57 figure કૌંસમાં 2 ત્યારબાદ ટાઈપ કરો plot કૌંસમાં x અલ્પવિરામ y
10:24 તફાવત સ્પષ્ટ છે. તો આ હતો log-log() આલેખ.
10:33 હવે આપણે થોડા વધુ આલેખો જોઈશું અને એ સાથે જ જોઈશું કે ઇન્ટરનેટ પર matplotlib ની મદદ કેવી રીતે એક્સેસ કરવી.
10:43 matplotlib વિશે મદદ આપેલ વેબસાઈટથી મેળવી શકાય છે
10:55 વધુ આલેખો matplotlib.sourceforge.net સ્લેશ users સ્લેશ screenshots.html અને સાથે જ matplotlib.sourceforge.net સ્લેશ gallery.html પર પણ જોઈ શકાય છે.
11:13 અહીં આ ટ્યુટોરીયલનો અંત થાય છે. આ ટ્યુટોરીયલમાં આપણે શીખ્યા,
11:20 ૧. scatter() ફંક્શનનાં ઉપયોગ વડે સ્કેટર આલેખ આલેખવો
11:22 ૨. pie() ફંક્શનનાં ઉપયોગ વડે પાઈ ચાર્ટ આલેખવો
11:25 ૩. bar() ફંક્શનનાં ઉપયોગ વડે બાર ચાર્ટ આલેખવો
11:28 ૪. loglog() ફંક્શનનાં ઉપયોગ વડે લોગ-લોગ ગ્રાફ આલેખવો
11:33 ૫. matplotlib ઓનલાઈન મદદ એક્સેસ કરવી. આભાર.
11:42 તો તમારી માટે ઉકેલવા હેતુ થોડા વધુ સ્વ:આકારણી પ્રશ્નો છે.
11:46 ૧. scatter x અલ્પવિરામ y અલ્પવિરામ color=blue marker= d અને plot x અલ્પવિરામ y અલ્પવિરામ color=b અલ્પવિરામ marker= d) આ એકસમાન છે.
12:04 True છે કે False?
12:07 ૨. ઉભી ત્રાસી લાઈનો સાથે બાર ચાર્ટ નિર્માણ કરવા માટે કયો સ્ટેટમેંટ રજુ કરી શકાય છે.
12:15 ૧. bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ color=એકલ અવતરણમાં w અલ્પવિરામ hatch= એકલ અવતરણમાં સ્લેશ
12:27 ૨. bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ fill=False અલ્પવિરામ hatch= એકલ અવતરણમાં સ્લેશ સ્લેશ
12:38 ૩. bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ fill=False અલ્પવિરામ hatch= એકલ અવતરણમાં બાર
12:52 ૪. bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ color= એકલ અવતરણમાં w અલ્પવિરામ hatch= એકલ અવતરણ
13:02 અને હવે જવાબો,
13:06 ૧. False.
13:9 બંને ફંક્શનો એક પ્રકારનાં આલેખને નિર્માણ કરતા નથી.
13:13 ૨. bar કૌંસમાં x અલ્પવિરામ y અલ્પવિરામ fill=False અલ્પવિરામ hatch= એકલ અવતરણમાં બાર આ ઉભી ત્રાસી લાઈનો સાથે બાર ચાર્ટનું નિર્માણ કરવા માટે યોગ્ય વિકલ્પ છે.
13:31 આશા રાખું છું કે તમને આ ટ્યુટોરીયલ ગમ્યું અને તમને તે ઉપયોગી રહ્યું.
13:34 આભાર!

Contributors and Content Editors

Jyotisolanki