Hello
I am trying to make the scale of a Plot vs. Depth column on a report log user defined. The logarithmic option for Scale Type in the Main Properties tab presents the data logarithmically, but there is no option to display scale lines. As a result, I have been superimposing a Lines at Values to serve as the scale lines. This approach is adequate as long as the scale max and min are static. I would like to make these user defined, though, so the scale can be adjusted depending on data range. Thanks for your help!
Ryan
Hi Szang,
thanks a lot for your replies, I will have a look asap and let you know my thoughts.
Cheers
Jerome
As an additional thought to this, if you expand it to cover 5 or 6 log cycles, and the user specifies the whole range, it is likely that the scale lines will be so close together as to be indestinguishable from each other. You can account for this by creating a second fixed curve plot with only the main cycle lines and the halfway lines. Then in the plot entity, use an expresion to decide which fixed curve to plot. The expression in plain English would be: if the plot range is greater than 3 cycles, use the fixed curve with only major and halfway lines, else, use the fixed curve with all intermediate lines. Gint allows input of either a single name or an expression in the fixed curve property of the graph entity but I have not tried this. The point at which you switch from one fixed curve to the other can be adjusted based on the width of your graph and the desired effect.
Here is an approach that provides full flexibility of user defined logarithmic scale in a plot vs depth entity on a log report. Something to think about if you want full flexibility of specifying max and min scale points. Note, as described later, it is not limitless, you have to program for the maximum and minimum possible scale selections. For this example, I programed for 3 log cycles from a value of 1 to a value of 1000. It is easy enough to expand to whatever your requirements are.
First to show how it works. I set up 2 user report variables, one for minimum scale and one for max scale. The user enters these values at output time. You could link these to a field in the data if you want.
If I input 1 for minimum scale and 1000 for maximum scale I get the following output.
Note that it shows all 3 cycles with labels on each major cycle (1, 10, 100, and 1000)
If I specify 10 as the minimum and 1000 as the maximum I get the following output.
Note that it now only shows 2 cycles with labels for 10, 100, and 1000
If I specify minimum = 100 and maximum = 1000, I get the following output.
Now it only shows 1 cycle as expected with appropriate labels.
It even accommodates non even cycle selections for min and max scale. If I select a minimum scale of 80 and a max scale of 700, I get the following output.
Note it has the max and min endpoints properly labeled and a properly positioned label for the even cycle line of 100.
To do this involves 2 major steps, creating the scale lines and creating the scale labels.
Starting with the scale lines. These are created using the fixed curve option of the plot vs depth entity. In symbol design under fixed curves I started a new page. I then drew solid horizontal lines from x = 0 to x=100 and at y values of 1, 10, 100, and 1000. Note that for fixed curves x is the independent axis which correlates to the depth axis of the plot vs depth entity so these will ultimately plot vertically. Also note that you do not take the log of these dimensions, gINT will take care of that. I ran them out to an x coordinate of 100 for this example which will accommodate a borehole of up to 100 feet deep, you can extend them to 1000. If you have a boring deeper than 1000 feet my hats of to ya.
Next I added dashed lines from x= 0 to x = 100 at y values of 5, 50, and 500. these are the halfway scale lines
Next I added dotted lines from x=0 to x=100 at y values of 2,3,4,6,7,8,9,20,30,40,60,70,80, 90,200,300,400,600,700,800,900. These are the intermediate scale lines.
Name this fixed curves page and then specify that name as a fixed curve in the log plot vs depth entity. gINT will plot the lines properly based on the selected scale and clip anything that is outside the selected scale points.
The labels are bit more tricky. The two end points are easy, they are simply fixed text entities that plot the user input report variables for max and min scale. The report design window is shown in the picture below
I set them to plot opaque so they block out the column edge lines. My plot vs depth entity is 2.5 inches wide and starts at x=0.
I then created separate text entities for each major cycle label (1, 10, 100, and 1000) They are shown at evenly spaced x coordinates in the report design window above but they use the offset x property so they will not plot at that actual location. An example setup of the text entity for the "100" label follows. The main tab looks like this.
The configuration tab with the output condition expanded looks like this
Note the output condition only prints the 100 label if it is between the user input report variables for maximum and minimum scale values, If it is outside the select scaled range, the label does not print.
The configuration tab with the output override x expanded is shown below.
This formula calculates the x coordinate for the 100 label based on the graph width of 2.5 inches and the graph starting point of zero. In plain English the formula is x = ((Log(100)-Log(minscale))/(lLog(maxscale)-Log(minscale))) * 2.5. The other labels are modified to calculate the position for each major cycle point in the possible range for the graph, in my case 4 labels = 3 cycles. It is possible for the user to specify the max and min scale so that no major cycle lines are plotted and therefor the only labels will be the 2 endpoints (ie. min = 20 and max = 40). It is also possible that the user can specify a range that will cause the major cycle labels to overprint the 2 end labels (ie min = 99 and max =1001). I am sure you can figure out how to rectify these conditions (just don't do it). You can add labels for the half cycle points in a similar manner if you want but this could become overcrowded for a graph that spans several cycles.
I have tested this with limited data and it seems to work fine. It provides both dynamic logarithmic scale lines and dynamic labels for a logarithmic plot vs depth entity on a log report. The same approach should also work for a fence report but I have not tried it.
Let me know if you have any questions.
I just checked and indeed the logarithmic graph on a log report does not generate scale markers and values in the same way that an arithmetic report does (told you I had never tried it). I may look into using fixed curves to do this in the next few days but need to brush up on fixed curves first.
The log report plot vs depth entity does have an option to create vertical scale lines. This may not work for a log plot (never tried it) but it certainly works for an arithmetic plot. The fence plot vs depth entity does not have this option. I presume you are talking about a fence report not a log report.
Like you, I have used lines at a static x - position many times on fence reports but have always been able to know exactly where those lines needed to be. I have often wondered if the fixed curves expression option on the fence report version could be used to generate these lines on a fence report but never had to try. You might want to try it. For example you could specify fixed curves at 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000. Then set your scale using an expression and if they plot out of the scale range they wouldn't show. You would still have to deal with the scale labels though. This would allow you to have ranges of varying number of cycles 0.1 to 1 and 0.1` to 1000 would theoretically be possible. I may try this soon and will report back if I do. If you try it first let me know.