How to resolve the algorithm Plot coordinate pairs step by step in the Factor programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Plot coordinate pairs step by step in the Factor programming language

Table of Contents

Problem Statement

Plot a function represented as    x,  y    numerical arrays. Post the resulting image for the following input arrays (taken from Python's Example section on Time a function): This task is intended as a subtask for Measure relative performance of sorting algorithms implementations.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Plot coordinate pairs step by step in the Factor programming language

Source code in the factor programming language

USING: accessors assocs colors.constants kernel sequences ui
ui.gadgets ui.gadgets.charts ui.gadgets.charts.lines ;

chart new { { 0 9 } { 0 180 } } >>axes
line new COLOR: blue >>color
9 <iota> { 2.7 2.8 31.4 38.1 58 76.2 100.5 130 149.3 180 } zip
>>data add-gadget "Coordinate pairs" open-window


  

You may also check:How to resolve the algorithm Pascal's triangle step by step in the TypeScript programming language
You may also check:How to resolve the algorithm Associative array/Iteration step by step in the FutureBasic programming language
You may also check:How to resolve the algorithm Tree datastructures step by step in the Go programming language
You may also check:How to resolve the algorithm SHA-256 step by step in the Delphi programming language
You may also check:How to resolve the algorithm Floyd's triangle step by step in the Visual Basic .NET programming language