Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
graphics [2024/12/03 20:38]
qcbs [Exercise 2 - Layers, cropping and manipulation of colors.]
graphics [2024/12/04 19:27] (current)
qcbs [Exercise 5]
Line 97: Line 97:
 {{::​iiw_logo.png?​direct&​200|}} {{::​iiw_logo.png?​direct&​200|}}
  
-  - In Inkscape, click on File>​Document Properties. Specify a width and height of 200 mm. Note that the background is transparent by default. To have a white background for the output image, click on Background color, and make the Alpha channel opacity (A) 100%+  - In Inkscape, click on File>​Document Properties. Specify a width and height of 200 mm. 
   - Click on File>​Import and choose the iiw_logo.png file from your computer. This will be used as a reference. You can make it bigger and place it beside the canvas. ​   - Click on File>​Import and choose the iiw_logo.png file from your computer. This will be used as a reference. You can make it bigger and place it beside the canvas. ​
   - Start by creating a square that fills most of the canvas. When done, click on the square and adjust the width W and height H on the top menu so that both values are equal. ​   - Start by creating a square that fills most of the canvas. When done, click on the square and adjust the width W and height H on the top menu so that both values are equal. ​
Line 119: Line 119:
   - Install the svglite package and the spocc package<​file rsplus>​install.packages('​svglite'​)   - Install the svglite package and the spocc package<​file rsplus>​install.packages('​svglite'​)
 install.packages('​spocc'​)</​file>​ install.packages('​spocc'​)</​file>​
-  - Load the library. <file rsplus>​library(svglite)</​file>​+  - Load the library. <file rsplus>​library(svglite)  
 +library(spocc)</​file>​
   - Execute the following code to create a pie chart, or adapt the code for another species or to use your own data. <file rsplus>   - Execute the following code to create a pie chart, or adapt the code for another species or to use your own data. <file rsplus>
 df <- occ(query = 'Puma concolor',​ from = '​gbif',​limit=10000) df <- occ(query = 'Puma concolor',​ from = '​gbif',​limit=10000)
Line 150: Line 151:
   - Click on the Create and edit text objects icon, and put a title for the infographic. ​   - Click on the Create and edit text objects icon, and put a title for the infographic. ​
   - To add a small paragraph of text, click/drag to delineate where the section of text will be. This way, lines of text will wrap within that section. ​   - To add a small paragraph of text, click/drag to delineate where the section of text will be. This way, lines of text will wrap within that section. ​
-  - Choose a photo that you want to put at the centre of the diagram on EOL (http://​eol.org) by searching with the name of the species. Save this photo to your computer and import in Inkscape with File>​Import. ​+  - Choose a photo that you want to put at the centre of the diagram on EOL (http://​eol.org) or Wikimedia Commons (https://​commons.wikimedia.org/​wiki/​Main_Page) by searching with the name of the species. Save this photo to your computer and import in Inkscape with File>​Import. ​
   - Resize approximately the image and click on the Create circles, ellipses and arcs icon. Click-drag on the photo to delineate the part of the photo that you want to put in the circle. You can put the circle semi-transparent (Fill, change Opacity) to make this easier. Then, select the photo and the circle by clicking and holding the SHIFT key. Click on Object>​Clip>​Set. This should crop the photo to a circle. You can release the clip at any time to undo this operation and get the complete photo back.    - Resize approximately the image and click on the Create circles, ellipses and arcs icon. Click-drag on the photo to delineate the part of the photo that you want to put in the circle. You can put the circle semi-transparent (Fill, change Opacity) to make this easier. Then, select the photo and the circle by clicking and holding the SHIFT key. Click on Object>​Clip>​Set. This should crop the photo to a circle. You can release the clip at any time to undo this operation and get the complete photo back. 
   - Download a silhouette of your animal, or this {{ ::​cougar_silhouette.png?​linkonly |Cougar silhouette}} and open it in Inkscape as a separate file. Click on the silhouette and Path>​Trace bitmap. Choose Colors, specify 2 passes, and click on OK. You can then select the silhouette in vector format by clicking on it and copy-paste it on your infographic. Now, position it and choose a color. ​   - Download a silhouette of your animal, or this {{ ::​cougar_silhouette.png?​linkonly |Cougar silhouette}} and open it in Inkscape as a separate file. Click on the silhouette and Path>​Trace bitmap. Choose Colors, specify 2 passes, and click on OK. You can then select the silhouette in vector format by clicking on it and copy-paste it on your infographic. Now, position it and choose a color. ​