androidplot

AndroidPlot: domain labels from 1 to 11

戏子无情 提交于 2020-01-04 05:25:10
问题 I've implemented AndroidPlot in my app and it works fine, apart from the X-axis labels, which they go from 0 to ten. I'd like to display 1 to eleven. Besides, the labels on the Y-axis do not appear. Code I'm using: import java.text.DecimalFormat; import java.util.Arrays; import android.app.Activity; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import com

Format point label on XYPlot

二次信任 提交于 2019-12-31 04:37:32
问题 Method described in Androidplot tutorial doesn't work with API version 1.1.0. There is no method setPointLabeler() in class LineAndPointRenderer . 回答1: That documentation is for a very old version of Androidplot - that method has moved into LineAndPointFormatter: LineAndPointFormatter formatter = new LineAndPointFormatter(); formatter.setPointLabeler(new PointLabeler() { @Override public String getLabel(XYSeries series, int index) { // your code here } }); 来源: https://stackoverflow.com

How to make line with rounded (smooth) corners with AndroidPlot

南楼画角 提交于 2019-12-28 05:35:36
问题 I have a small problem with ploting my graph. On a picture below is what I have already done. The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple XYPlot here data are represented with SimpleXYSeries (values are dynamically created). Here is a little snippet of code (only for example): plot = (XYPlot) findViewById(R.id.simplexyPlot); series1 = new SimpleXYSeries(Arrays.asList(series1Numbers), SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "Link 1"); f1 =

XYPlot (AndroidPlot library) in ScrollView does not appear

允我心安 提交于 2019-12-24 14:15:30
问题 I am trying to put XYPlot (from AndroidPlot library http://androidplot.com/) in ScrollView container, because there will be more stuff in this Activity. Unfortunately all I am getting back is blank space, where the chart should appear (when I remove ScrollView it appears properly). My layout xml file: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"

I want to save a .png image from AndroidPlot

家住魔仙堡 提交于 2019-12-23 12:29:15
问题 I have written a code which plots a Line Graph. This graph is plotted by using Android Plot.. How can i save this graph as .png image?? 回答1: xyPlot.setDrawingCacheEnabled(true); int width = xyPlot.getWidth(); int height = xyPlot.getHeight(); xyPlot.measure(width, height); Bitmap bmp = Bitmap.createBitmap(xyPlot.getDrawingCache()); xyPlot.setDrawingCacheEnabled(false); FileOutputStream fos = new FileOutputStream(fullFileName, true); bmp.compress(CompressFormat.JPEG, 100, fos); 回答2: You can get

Custom points on graph using AndroidPlot

删除回忆录丶 提交于 2019-12-22 11:06:52
问题 Anyone that has used the AndroidPlot library tell me how would I go about drawing custom points on a graph. So far I'm using LineAndPointRenderer class and settings lines to transparent. I would like to at least change the size of the dot but if possible have a custom image instead. P.S someone with 1500 rep needs to create a "AndroidPlot" tag. 回答1: Solved the problem by creating my own renderer. import android.graphics.*; import com.androidplot.series.XYSeries; import com.androidplot

AndroidPlot Multi color LineAndPointFormatter

孤人 提交于 2019-12-13 06:59:30
问题 Can anybody please help me with this issue i.e. Am trying to plot a Multicolor graph using android plot with single LineAndPointFormatter. According to the Range values LineAndPointFormatter color will change i.e. Suppose range values lies in between 0-50 then Line color will be blue, if range values lies 50-100 then color will be green, if range values lies 100-200 then color will be black and above 100 it will be gray. Check and let me know if below solution is fine or not i.e.

Changing the background of an androidplots to white

馋奶兔 提交于 2019-12-13 06:15:07
问题 I have being playing around with the ListView of XYPlots. I was able to change background either by using style="@style/APDefacto.Light" or style="@style/APDefacto.Dark". These two work well but, I want my graph to have complete white background instead of a light or dark background. Screenshot with the light background. If you look carefully at the graph, you will see that the background has a grey color but the graph itself is white. I want the whole background to be completely white. I

AndroidPlot: LineAndPointFormatter causing crash when passing in Context and colors.xml resource ID

拥有回忆 提交于 2019-12-13 04:28:48
问题 I'm trying to avoid using rgb values, so this method: public LineAndPointFormatter(Integer lineColor, Integer vertexColor, Integer fillColor) { this(lineColor, vertexColor, fillColor, FillDirection.BOTTOM); } where I'm supposed to pass in: LineAndPointFormatter lpf = new LineAndPointFormatter(Color.rgb(0, 0, 200), null, Color.rgb(0, 0, 80)); is working just fine, but I want to use this method: public LineAndPointFormatter(Context ctx, int xmlCfgId) { // prevent configuration of classes

AndroidPlot : setting the labels on the X-axis

偶尔善良 提交于 2019-12-12 10:59:39
问题 With the AndroidPlot website being down, I'm kind of stuck on this issue. Several similar questions have been asked, but none of them were properly answered, so here I go. I would like to know how I can relabel my X-axis. For example, if I want to plot values about monthly data, I would plot it like (1, 82) for Januari, (2,67) for Februari , and so on. Afterwards, I want to change the X-labels from [1, 2, 3, ...] to x_labels = ["Januari", "Februari", ...] . How can I do this? Oh and please