AndroidPlot 1.x change range label formatting - androidplot

I'm trying to set the range value format (Y-axis) of my plot to not show any decimals. In versions prior to 1.x you could apparently set the format by using plot.setRangeValueFormat(new DecimalFormat("#")); but this method is not available in the newest version.
How can I do this in the newest version of AndroidPlot?
Thanks in advance!

In 1.x you'd do this:
plot.getGraph().getLineLabelStyle(XYGraphWidget.Edge.LEFT).setFormat(new DecimalFormat("#"));
For background, the change in 1.x was part of a larger set of changes to enable support for arbitrarily applying labels on any of the 4 edges of the screen, as opposed to only the bottom and left edges.

Related

how to present negative value with log scaling in paraview

I am trying to display the physical quantity of each vertex in the mesh by paraview.
The ranges of the physical quantity ranges from positive to negative.
I want to display both positive and negative values in log scale in paraview in the same way as proposed by Alan in 2014.
That is
I propose that we find maxVal = max(maximum, abs(minimum)). Then, we set the color bar to run from maxVal to -maxVal. We log scale the top half of the color legend, running from maxVal to maxVal*10^-4, and we reverse log scale the bottom half of the color legend, running from -maxVal*10^-4 to -maxVal.
(As he said -4 is an arbitrary parameter.)
One question is that
I think this proposal has not implemented in paraview(I use version 5.2),
is it right?
And another question is that is there a way to draw colors as Alan proposed in paraview?
It has not been implemented as of ParaView 5.4, and it is currently not possible to achieve that coloring.

Round to 2 decimal places on range AndroidPlot

I am using AndroidPlot to create a simple XYPlot.
My y axis is (by default) rounding up to 1 decimal place. How can I change this to 2 decimal places?
I have found another answer that shows how you would do something similar with the old version of AndroidPlot: (this gets rid of decimal places but I assume this is the same function I would use)
// Gets rid of decimal places
mySimpleXYPlot.setDomainValueFormat(new DecimalFormat("0"));
Does anyone know how to do this with AndroidPlot 1.*?
Thank you!
Since support was added in 1.x to display labels along any of the four edges of the graph, the way to attach a formatter was modified to support an arbitrary edge.
If you're using the standard domain value labels along the bottom of the plot, this should give you the same behavior as before:
plot.getGraph().getLineLabelStyle(XYGraphWidget.Edge.BOTTOM)
.setFormat(new DecimalFormat("0.0"));

Spotfire- Sorting stacked bar chart

I am trying to plot a stacked bar chart for number of accounts we opened in spotfire; since there are a lot of values, I used the bin function for number and I am coloring by Names of Account-Holding agencies. Spotfire is stacking these colors by agencies high to low; I'd like to make is low to high such that the contributors of maximum accounts are the topmost color in the chart. Traditional sorting of bars is not working. Could someone please let me know if there is any alternative way I can sort by colors?
This feature is available in the latest release, 7.5. We have not upgraded to 7.5 yet but stacked bar chart sorting is mentioned on page 5 of the release notes.

Change highlight point color in flot

I am using latest flot plugin 0.8 to plot some realtime data.I stuck at following issue
I highlighted point using plot.highlight(series, dataPoint);
Its perfectly working fine.But now I want to change highlight color of already plotted graph.
Is there any way to change highlight point color after plotting flot chart?
Any help would be highly appreciated.
Simply change the series 'highlightColor' option, i.e.
plot.getData()[0].highlightColor = "#f00";

Partially missing gridlines on log-scale charts in Excel 2007

I'm using Excel 2007 to create a log-scale chart of numbers (specifically the Zimbabwean dollar exchange rate) over time. I'm using an x-y scatterplot and noticing one odd quirk.
The range of y values (numbers) spans a factor of about 10^30. On every chart I make using this data, half the gridlines are missing. Specifically, only the gridlines corresponding to the largest values show up. In fact, regardless of the total range only the top factor of 10^13 or so have gridlines. This is not dependent on the log base.
Am I doing something wrong? Is this a known bug? I can't find any references to this issue on google or microsoft's bug reports.
Silly work around as well, but if you are going to be presenting your graph in Powerpoint, you can make the background color of the graph "no fill" and then when you paste it into Powerpoint (I paste it as a PDF). You can draw grid lines and match them up with the ticks on the y-axis. Arrange your graph "bring to front" when you are finished drawing so that the lines won't appear in front of your data. You can group it all to make sure the lines don't shift while making your presentation and so that they re-size properly if you re-size your graph.
I'm having the same problem, it's definitely a bug.
Try a sequence 1, 10, 100, 1e+12, 1e+30 vs 0..4 and plot x,y scatter, and clearly the scale grid is messed-up even in linear, and in log is the behaviour you described.
My workaround was to make a transformation of the values and depict them scaled down (by a Million factor). That way the data the graph is handling is never above 10e9 (the value I started to hit issues).
So, my suggestion is: graph a Log version of the data (and clearly make a legend for it)
I was able to replicate your problem and come up with a pseudo-workaround.
The formatting goes a bit funny, but all the lines show up if you right-click on the axis, select Format Axis. Under the Axis Options, there is a Horizontal Axis Crosses setting. Changing it from Automatic to Maximum Axis Value causes all the gridlines to appear.
Ran into same thing: Will not show log grid lines for y-axis ranging below 1e-7. Have need for dynamic range of 1e5 down to 1e-15. Tagging auto or max will show grid, but puts axis labels in non-useful place for display.
My workaround: used Open Office to get what I needed. Could not find useful solution in Excel 2010.

Resources