# Chart or Line Plot

**URL:** <https://forum.knime.com/t/chart-or-line-plot/1268>\
**Category:** KNIME Analytics Platform\
**Created:** [May 19, 2011, 3:11pm UTC](https://forum.knime.com/t/chart-or-line-plot/1268 "2011-05-19T15:11:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anva](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@anva](https://forum.knime.com/u/anva)\
**Post date:** [May 19, 2011, 3:11pm UTC](https://forum.knime.com/t/chart-or-line-plot/1268/1 "2011-05-19T15:11:47Z")

</div>

Hi,

I'm trying to get a Line Plot from my data. The data consists of Date (date), Name (string) and value1 (double) and value2 (double). And I would like to see the development of the two values in dependency of the date (Date x-axes, value y-axes). Like development of share prices.

Is this possible?

regards

christel&nbsp;

---

<div class="post-metadata">

**Author:** ![gabriel](https://forum-cdn.knime.com/user_avatar/forum.knime.com/gabriel/32/61386_2.png) [@gabriel](https://forum.knime.com/u/gabriel)\
**Post date:** [May 19, 2011, 3:54pm UTC](https://forum.knime.com/t/chart-or-line-plot/1268/2 "2011-05-19T15:54:06Z")

</div>

Yes, it is. You may want to use the Mask Time and/or Time To String node and then convert the column into a row id using the Row ID node. The Line Plot can then be used to display value1 and value2 against the row id (date/time).

---

<div class="post-metadata">

**Author:** ![AI](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/e274bd/32.png) [@AI](https://forum.knime.com/u/AI)\
**Post date:** [May 20, 2011, 12:50pm UTC](https://forum.knime.com/t/chart-or-line-plot/1268/3 "2011-05-20T12:50:43Z")

</div>

If you have your data rowwise you may need to traspose.

There is a node called transpose sth...  
  
 With the node lineplot you can only show columns as time series. Each column gets its name by the name, so you can set a new id with the rowID node first.

However all these line plot nodes make quite ugly plots with a horrible axis describtion. Therefore you could use the R-view node and call some nice libraries in R.

---

<div class="post-metadata">

**Author:** ![anva](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@anva](https://forum.knime.com/u/anva)\
**Post date:** [May 24, 2011, 4:03pm UTC](https://forum.knime.com/t/chart-or-line-plot/1268/4 "2011-05-24T16:03:15Z")

</div>

thanks for the additional info. I'm not yet familiar with R but I'll give it a try later. for now the solution with the date as row id has to be enough.

---

<div class="post-metadata">

**Author:** ![Alberto](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/ea5d25/32.png) [@Alberto](https://forum.knime.com/u/Alberto)\
**Post date:** [July 8, 2011, 11:35am UTC](https://forum.knime.com/t/chart-or-line-plot/1268/5 "2011-07-08T11:35:48Z")

</div>

Hi !

Thanks for these informations, that helped me well... but still, I have a problem.

My values in the RowID are not equally distanced ; for instance, I have :  
 Col0 = [0, 1, 4, 6]

When I display the plot, the values in the x axes are not scaled... so the shape of the plot is not good.

I have something like :

0----1----4----6

But I was expecting something like :

0----1--------------4---------6

---

<div class="post-metadata">

**Author:** ![Alberto](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/ea5d25/32.png) [@Alberto](https://forum.knime.com/u/Alberto)\
**Post date:** [July 19, 2011, 2:17pm UTC](https://forum.knime.com/t/chart-or-line-plot/1268/6 "2011-07-19T14:17:38Z")

</div>

Nobody knows ?

I can add some precisions :

If I had two columns like this

x;y  
 0;0  
 1;1  
 2;4  
 4;16  
 10;100

and I want to plot y = f(x).

So, I'm expecting something like this : [http://img600.imageshack.us/img600/7150/knime003.png](http://img600.imageshack.us/img600/7150/knime003.png)

And KNIME gives me this : [http://img855.imageshack.us/img855/2250/knime004.png](http://img855.imageshack.us/img855/2250/knime004.png)

Can you see the difference on the x axes ? KNIME doesn't respect the distance between the points.

---

<div class="post-metadata">

**Author:** ![richards99](https://forum-cdn.knime.com/user_avatar/forum.knime.com/richards99/32/48547_2.png) [@richards99](https://forum.knime.com/u/richards99)\
**Post date:** [July 19, 2011, 10:27pm UTC](https://forum.knime.com/t/chart-or-line-plot/1268/7 "2011-07-19T22:27:00Z")

</div>

The scatter plot will give you scaling correctly, but obviously no lines, just a scatter.

This does seem somewhat of a limitation of the Line Plot viewer which forces the use of the RowID as the x-axis thereby not being able to specify a String or Double value column.

Simon.

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 23, 2023, 8:16pm UTC](https://forum.knime.com/t/chart-or-line-plot/1268/8 "2023-06-23T20:16:15Z")

</div>


