# Question:label of points in plot

## Question:label of points in plot

Maple

Hi,

I need to plot a schematic of a simple problem which is a meshed bar. The problem is 1D so we have just x coordinate. I need to put the label of nodes on them. It starts from 1 on the left and ends with 6 on the right side. The green element is a specific element and I plotted that with green to colorcode it. Is there any way to do that? And is there any way at all that I can do this procesure more easily?

> restart:
> with(LinearAlgebra):
> with(plots):
> M:=Matrix(6, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 2, (2, 2) = 1/5, (2, 3) = 0, (3, 1) = 3, (3, 2) = 2/5, (3, 3) = 0, (4, 1) = 4, (4, 2) = 3/5, (4, 3) = 0, (5, 1) = 5, (5, 2) = 4/5, (5, 3) = 0, (6, 1) = 6, (6, 2) = 1, (6, 3) = 0}):
> CElem:=3:
> NbNode:=RowDimension(M):
> p1:=[seq([M[i,2],1],i=1..CElem)]:
> p2:=[seq([M[i,2],1],i=CElem..CElem+1)]:
> p3:=[seq([M[i,2],1],i=CElem+1..NbNode)]:
> P1:=plot(p1,color=blue,thickness=2):
> P2:=plot(p2,color=green,thickness=2):
> P3:=plot(p3,color=blue,thickness=2):
> PP1:=plot(p1,color=red,thickness=4,style=point):
> PP2:=plot(p2,color=red,thickness=4,style=point):
> PP3:=plot(p3,color=red,thickness=4,style=point):
> display (P1,P2,P3,PP1,PP2,PP3);

﻿