Formatting Max and Min Values on a Line Graph
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 130
- Joined: Fri Apr 13, 2018 1:53 pm
Formatting Max and Min Values on a Line Graph
Hi all,
currently I am working with Lihe Graphs and I remember that I already found a solution for my problem years ago - But I forgot how I solved this.
Let me explain:
I have a simple Line Graph with some values by Day in the range between 50 and 100. The Problem: The LineGraph ist starting with 50 because this is the minimum value.
Example:
1,50
2,100
3,75
My goal is to set the minimum value shown to 0 and not to 50 in the graph, means that the line is not on the bottom of the LineGraph.
Any Ideas how to fix this?
Stefan
currently I am working with Lihe Graphs and I remember that I already found a solution for my problem years ago - But I forgot how I solved this.
Let me explain:
I have a simple Line Graph with some values by Day in the range between 50 and 100. The Problem: The LineGraph ist starting with 50 because this is the minimum value.
Example:
1,50
2,100
3,75
My goal is to set the minimum value shown to 0 and not to 50 in the graph, means that the line is not on the bottom of the LineGraph.
Any Ideas how to fix this?
Stefan
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Formatting Max and Min Values on a Line Graph
Hi,
what about this ?
0,0
1,50
2,100
3,75
Best regards
Jean-Marc
what about this ?
0,0
1,50
2,100
3,75
Best regards
Jean-Marc
https://alternatic.ch
-
- Posts: 130
- Joined: Fri Apr 13, 2018 1:53 pm
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Formatting Max and Min Values on a Line Graph
Hi.
How are you generating the X and Y values? In other words, what is the story with the ordered pairs as you wrote them? I see no obvious arithmetic relationship, only that the first value is 50, the second is 100 and the third is 75.
This problem should be trivial, if we knew the method.
Craig
How are you generating the X and Y values? In other words, what is the story with the ordered pairs as you wrote them? I see no obvious arithmetic relationship, only that the first value is 50, the second is 100 and the third is 75.
This problem should be trivial, if we knew the method.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Formatting Max and Min Values on a Line Graph
Rereading, is it that the first value is the day number, and the second is some value associated with that day?
OK, then what is the requirement for loading that second value? In other words, is that value simply entered, or is there some method to generate that value?
Craig
OK, then what is the requirement for loading that second value? In other words, is that value simply entered, or is there some method to generate that value?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Formatting Max and Min Values on a Line Graph
Rereading yet again,
Craig
But if you want the minimum value to be 0, then doesn't the "line" NEED to be on the "bottom"My goal is to set the minimum value shown to 0 and not to 50 in the graph, means that the line is not on the bottom of the LineGraph.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Formatting Max and Min Values on a Line Graph
I feel like I am mimicking Richmond's posting style.
Craig
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Formatting Max and Min Values on a Line Graph
May as well keep going with this.
It sounds as if you would be better served with a bar graph instead of a line graph. A bar graph shows values associated with some arbitrary parameter, such as a day number and the temperature that day.
A line graph usually shows a relationship between two variables, known as an "independent variable" and a "dependent variable", and shows the "trend" as the independent variable changes. For example a series of numbers and their squares.
You can force either to do the job, but this goes back to the original question, what are you trying to display?
Craig
It sounds as if you would be better served with a bar graph instead of a line graph. A bar graph shows values associated with some arbitrary parameter, such as a day number and the temperature that day.
A line graph usually shows a relationship between two variables, known as an "independent variable" and a "dependent variable", and shows the "trend" as the independent variable changes. For example a series of numbers and their squares.
You can force either to do the job, but this goes back to the original question, what are you trying to display?
Craig
-
- Posts: 130
- Joined: Fri Apr 13, 2018 1:53 pm
Re: Formatting Max and Min Values on a Line Graph
Hi Craig,
we are analyzing blood test results and want to show the trend.
Means:
Test 1: Result = 50
Test 2: Result = 100
Test 3: Result = 75
This is for what I am looking for. You can see that the graph is starting with 0 in this example I found:
And this is what I have. You can see that the graph ist starting with the lowest value.
we are analyzing blood test results and want to show the trend.
Means:
Test 1: Result = 50
Test 2: Result = 100
Test 3: Result = 75
This is for what I am looking for. You can see that the graph is starting with 0 in this example I found:
And this is what I have. You can see that the graph ist starting with the lowest value.
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Formatting Max and Min Values on a Line Graph
Aha.
I did not get the fact that your "50" was sitting on the abscissa.
You must currently use item 2 of the loc of the point you want to place that small "X" graphic, or some other means of setting the vertical location of that point. And you use that point to then draw the line graph.
I do not know your code, but isn't there a single line in it where you might (pseudo):
before plotting that point?
That "constant" would be the vertical difference between the abscissa and the "50" on your graph.
Craig
I did not get the fact that your "50" was sitting on the abscissa.
You must currently use item 2 of the loc of the point you want to place that small "X" graphic, or some other means of setting the vertical location of that point. And you use that point to then draw the line graph.
I do not know your code, but isn't there a single line in it where you might (pseudo):
Code: Select all
subtractSomeConstantFromTheCurrentVerticalValueOfYourTestResult
That "constant" would be the vertical difference between the abscissa and the "50" on your graph.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Formatting Max and Min Values on a Line Graph
I do a lot of rereading of your posts and have to come back. I apologize, though it does help keep me ahead of Richmond in the post race.
The most recent graph shows the "75" to be lower than the "50". This is assuming that the three test values are still '50,100,75". Was that just an example of how the graph works, and not some other plotting factor I do not know about?
Craig
The most recent graph shows the "75" to be lower than the "50". This is assuming that the three test values are still '50,100,75". Was that just an example of how the graph works, and not some other plotting factor I do not know about?
Craig
-
- Posts: 130
- Joined: Fri Apr 13, 2018 1:53 pm
Re: Formatting Max and Min Values on a Line Graph
Hey,
I am talking only about "How the LG looks like".
In my example the LG Y is starting @0 and ending@700, it doest care about the values because it is fixed formatted.
In my LiveCode Example the Start and the End is dynamically calculated.
I want a Line Graph where the Y Start and End is preformatted and not dynamically calculated from the values
I am talking only about "How the LG looks like".
In my example the LG Y is starting @0 and ending@700, it doest care about the values because it is fixed formatted.
In my LiveCode Example the Start and the End is dynamically calculated.
I want a Line Graph where the Y Start and End is preformatted and not dynamically calculated from the values
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Formatting Max and Min Values on a Line Graph
Hi Stefan,
would this help?
You could change the color of the one point at 0,0 so it does not show much.
Kind regards
Bernd
would this help?
Code: Select all
1,50,0
2,100,
3,75,
Kind regards
Bernd
-
- Posts: 130
- Joined: Fri Apr 13, 2018 1:53 pm
Re: Formatting Max and Min Values on a Line Graph
Hi Bernd from Bochum,
(I remember you helped me some yrs ago with another LineGraph issue ).
Yes, this would help. Not beautiful but enough.
Thank you you guys and have an nice evening.
Stefan
(I remember you helped me some yrs ago with another LineGraph issue ).
Yes, this would help. Not beautiful but enough.
Thank you you guys and have an nice evening.
Stefan
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Formatting Max and Min Values on a Line Graph
I do not understand.I want a Line Graph where the Y Start and End is preformatted and not dynamically calculated from the values
If you get a series of test results, however you "label" each of them them, how do you intend to locate the points on the graph? By hand? It is simple to create a gadget that does this for you. so that all you need do is enter the test values, and the graph pops up, complete. I believe, from a previous post, that this is exactly what you wish for.
If you want I will make it for you. For me this is just for fun.
Craig