androidplot

How to change domain axis labeles in android plot?

一个人想着一个人 提交于 2019-12-12 04:54:56
问题 In my android plot, the domain values(that is the values displayed on the scale of the X axis) displayed currently are 0,1,2,3..... But I wanted a different order that is neither increasing or decreasing. The order that I want is 0, 26, 33, 12, 9 6, 23 ....(I already know this order and it is does not change.) How to I change the values displayed on the axis? 回答1: The easiest way is to define a mapping of labels that corresponds to each index. For example if your longest series consists of 6

Adding buttons and androidplot to a scrollview

倖福魔咒の 提交于 2019-12-12 04:33:55
问题 I can't seem to get buttons and androidplot together into a scrollview such that I can scroll down, past the androidplot to see the buttons. I am using androidplot 0.9.8. Here is my xml file: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:ap="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="example

Time series data not being interpreted properly

时光毁灭记忆、已成空白 提交于 2019-12-12 04:12:38
问题 I'm trying to create a simple line chart using a time series. The problem is that androidplot is not properly displaying the time values from the array, i.e. the dates are off. The dates should be: Jan 1 2001, Feb 1 2001, Mar 1 2001, Apr 1 2001, May 1 2001 but I am getting: Jan 1 2001, Jan 30 2001, Mar 1 2001, Mar 31 2001, May 1 2001 You can see from the the debug info in the formatted what data androidplot has interpreted. I am using JodaTime for time. Code is here: public class

Access UI elements from Asynctask

无人久伴 提交于 2019-12-11 21:48:10
问题 Im struggling a little bit with Asynctask and I would need some help. I am plotting some graphs with Androidplot and, as it is extremely slow, I want to use Asynctask to do it faster. The problem is that I don´t know how to access to the elements that I have declared in onCreate() from the Asynctask class. Here is the code: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.waveform); plot = (XYPlot) findViewById(R.id.XYPlot0);

Recycling View Android Plot becomes gray after Scrolling

谁说我不能喝 提交于 2019-12-11 14:12:48
问题 I got the following Problem. When Including Android-XYPlot into Recycle-View, the Plots are not displayed after Scrolling Elements out of the Screen. It seems to me if Androidplot needs to be reinflated, but that's not really effective. Links I have already found: XYPlot (AndroidPlot library) in ScrollView does not appear Is there any better Solution: Here is my Code: Activity: package at.fs.recycleviewerdemo; import android.graphics.Color; import android.graphics.Paint; import android

Range field in Android Plot (0.6.1.) is not showing the entire number

别来无恙 提交于 2019-12-11 10:50:12
问题 I create a simple xyseries with a boundary and set the mode to AUTO. The range of values I set is between 103 and 107. I am getting constant updates between these values and can I redraw the plot when it goes over size=20. The Y axis seems to only take two digits and not the entre number. This is the code. plot.setRangeBoundaries(0, 200.0, BoundaryMode.AUTO); plot.setDomainBoundaries(0, 20, BoundaryMode.AUTO); In the graph I am seeing the following on the Y axis and X axis with the dynamic

Have a GraphWidget fill the entire View in AndroidPlot

孤街醉人 提交于 2019-12-11 10:47:21
问题 Is there a way to have the graph of an AndroidPlot XYPlot fill the entire view without padding? I am specifically talking about the space on the left side that I marked red in the image: My goal is to overlay the graph over an image and have it flush with the parent views borders. I haved removed all the labels in my subclass of XYPlot, by setting their Paint to null, the space they would take up remains though. Here is how I set up the plot: public void setup() { this.setBackgroundPaint(null

RealTime XY Plot X-Axis update

笑着哭i 提交于 2019-12-11 08:47:09
问题 I'm using the Realtime Orientation Sensor Plot demo from the AndroidPlot library. How can I make the Domain x-axis values update when the graph scrolls? 回答1: The scroll and zoom example in the Androidplot DemoApp does this - here's a link to the source. In particular take a look at Line #153; that's where the where scrolling is handled. 来源: https://stackoverflow.com/questions/23272007/realtime-xy-plot-x-axis-update

AndroidPlot Change color of domain and range labels

泄露秘密 提交于 2019-12-11 05:34:16
问题 I am using the AndroidPlot library and am trying to change the colour of the domain and range labels. I set them like so: //Setting the names of the axis XYPlot.setRangeLabel("# of Alerts"); XYPlot.setDomainLabel("Day"); By default they are white but are barely visible against my cream background. Does anyone know how I can change these to black please? 回答1: You want something like mTripPlot.getGraphWidget().getDomainLabelPaint().setColor(my_colour); For the label it would be something like

Is it possible to hide points on an Androidplot XYplot?

£可爱£侵袭症+ 提交于 2019-12-11 05:25:33
问题 1) I have an Androidplot XYPlot and some values are 0 to represent "no data" on that point. Can I hide these points with value "0" from the plot? 2) If I can't hide them, can I make the graph lines going from the previous point, to the 0 value point and to the next point, another color (like red) to show that this is a point "with no data"? 回答1: XYPlot's underlying model is XYSeries which uses Numbers to represent points. If you're implementing your own XYSeries then just return null from