Questions tagged [line]

The shortest distance between two points. Or, a row of characters in text output.

is mostly used in below context:

  • text line or command line in text processing context;
  • line drawing or plotting in visualization or image-processing context
  • analytic geometry

For the LINE-API / LIFF use line-api or line-messenger

6255 questions
2
votes
1 answer

Changing line color

I'm trying to change the colour of a line on matplotlib subject to a condition. Basically I take a rolling average and a rolling standard deviation. I plot the rolling average, but I would like to change the line colour if the standard deviation…
Ashleigh Clayton
  • 1,443
  • 8
  • 23
  • 32
2
votes
1 answer

C how to read input separated by commas

I want to read the following input into scanf: 10 0 y 2 2, 80, 40, 0 This should be ready by scanf from a separate file. I can get the first two lines without the commas by just doing the following: scanf("%d %d %c %d", a1, a2, a3, c1, a4); How…
user2817240
  • 195
  • 1
  • 5
  • 13
2
votes
1 answer

Display only certain Shopify line items

This is for a Shopify site. Is there a way to display only certain line item properties in the cart? I have several and it looks messy so only want to display a chosen two or three.
susan
  • 372
  • 2
  • 5
  • 19
2
votes
2 answers

Draw line with varying thickness

I want to draw one continuous line/curve with varying thickness using C#. If I set the width of the Pen as fixed, thickness will not vary. How is it possible to change the thickness of line as it is drawn? Any help is appreciated.
AUser123
  • 651
  • 1
  • 7
  • 21
2
votes
4 answers

Reading a file line by line in C

I am trying to write some code that will open a file, read its content line by line and store each of these lines into an array. First I open the file and count the number of lines, each of the lines is of a fixed length so I simply do this : …
JoOb
  • 999
  • 2
  • 10
  • 10
2
votes
2 answers

Collision Handling Between Circle and Line Segments

I'm implementing a small game and am having trouble getting the physics working properly. In this game, there is one ball (a circle which moves from frame to frame, and may change radius) and several walls (line segments which also change and move…
Cameron
  • 96,106
  • 25
  • 196
  • 225
2
votes
1 answer

Connect canvas with lines

I need to connect two canvas with a line to create a dynamic workflow. I'll generate the canvas rectangle dynamic (amount of steps I have at DB) but I need to connect the steps with lines. Anybody have some ideas?
user1681595
  • 31
  • 1
  • 2
2
votes
1 answer

Passing parameter to function in add.expr inside heatmap.2

I'm generating clustering heatmap with heatmap.2 function (R gplots package). I'd like to add a vertical line(s) onto the image at variable location(s) using add.expr parameter. For example, xx=replicate(10, rnorm(10)) # some random…
yuk
  • 19,098
  • 13
  • 68
  • 99
2
votes
0 answers

Core Plot Line Selection

I am developing an iOS application that uses the Core Plot framework to plot some data points on a scatter plot along with a trend line. I would like the user to be able to select not only the data points, but the actual line. Basically, I need to…
EJV
  • 1,009
  • 1
  • 10
  • 17
2
votes
1 answer

Exception line-number in Jscript-ASP

I'm developing a website with server-side JScript engine over ASP server. I have several try-catch clauses in my code looking roughly like this: try { // do something } catch (err) { // pass it to the frontend code die("Exception caught: "…
Yonatan
  • 1,187
  • 15
  • 33
2
votes
2 answers

Python line read size in bytes

I'm working in linux. I would like to display the percentage of file parsed. That's why after reading a bit I decided that the most accurate way to do that would be get the total size (bytes) of the file i'm parsing then calculate the size (bytes)…
gmarco
  • 535
  • 3
  • 8
  • 16
2
votes
4 answers

Get the slope from one point and an angle in degrees

In javascript, I am trying to draw a line that is at an angle that is user defined. Basically, I have a point (x,y) and an angle to create the next point at. The length of the line need to be 10px. Let's say that the point to start with is (180,…
Phobis
  • 7,524
  • 10
  • 47
  • 76
2
votes
2 answers

Linux: search and remove in file, new line when it is between two lines of digits

I have a big text file that has this format: 80708730272 598305807640 45097682220 598305807660 87992655320 598305807890 598305808720 598305809030 598305809280 598305809620 564999067 598305809980 33723830870 As you can see there is a row of digits…
user2457193
  • 23
  • 1
  • 3
2
votes
2 answers

Given two points, how do I draw a line through them?

Say I have {x:10, y:20} and {x:100, y:40}, if I wanted to draw a line that starts at 10,20 and ends at 100,40 I'd do: context.beginPath(); context.moveTo(10, 20); context.lineTo(100, 40); context.stroke(); But what do I do if I want to draw a…
01AutoMonkey
  • 2,515
  • 4
  • 29
  • 47
2
votes
1 answer

achartengine - different colors for different points and lines

I'm using AChartEngine to visualize measurement values in a line chart view. The visualization itself works already however one important part is missing and I have no idea how to implement it. Each circle represents a measurement value and the…