1

I have the following xml for my plot:

<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"
    tools:context="com.example.ukhouser.rapidsightreductionform.PositionLines">

    <include layout="@layout/app_bar" />

    <LinearLayout
        style="@style/activity_layout"
        xmlns:ap="http://schemas.android.com/apk/res-auto"
        android:layout_below="@+id/app_bar">

        <com.androidplot.xy.XYPlot
            android:id="@+id/myPositionLines"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            ap.domainLabel="Domain"
            ap.rangeLabel="Lat"
            ap.title="Position Line Plot"
            ap:gridBackgroundColor="#56e713"
            ap:labelTextSize="@dimen/title_font_size"
            ap:rangeLabelTextSize="@dimen/range_label_font_size"
            ap:domainLabelTextSize="@dimen/domain_label_font_size"
            ap:graphMarginTop="15dp"
            ap:graphMarginBottom="50dp"
            ap:graphMarginLeft="25dp"
            ap:graphMarginRight="15dp"
            ap:graphDomainLineColor="#000000"
            ap:graphDomainLineThickness="1dp"
            ap:graphRangeLineColor="#000000"
            ap:graphRangeLineThickness="1dp"
            ap:rangeTickLabelTextSize="@dimen/range_tick_label_font_size"
            ap:rangeOriginTickLabelTextSize="@dimen/range_tick_label_font_size"
            ap:domainTickLabelTextSize="@dimen/domain_tick_label_font_size"
            ap:domainOriginTickLabelTextSize="@dimen/domain_tick_label_font_size"
            ap:legendTextSize="@dimen/legend_text_font_size"
            ap:legendIconHeight="15dp"
            ap:legendIconWidth="15dp"
            ap:legendHeight="30dp"
            ap:legendTextColor="#000000"
            ap:legendIconHeightSizeLayoutType="absolute"
            ap:legendIconWidthSizeLayoutType="absolute"
            ap:legendHeightSizeLayoutType="absolute"
            ap:legendWidthSizeLayoutType="absolute"
            ap:legendWidth="230dp" />

        <LinearLayout
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_gravity="bottom"
            android:orientation="horizontal">
            <CheckBox
                android:id="@+id/s1CheckBox"
                android:text="Series 1"
                android:checked="true"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"/>
            <CheckBox
                android:id="@+id/s2CheckBox"
                android:text="Series 2"
                android:checked="true"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"/>
            <CheckBox
                android:id="@+id/s3CheckBox"
                android:text="Series 3"
                android:checked="true"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"/>
        </LinearLayout>


    </LinearLayout>


</RelativeLayout>

I have clearly marked the following as the same size:

rangeTickLabelTextSize="@dimen/range_tick_label_font_size" ap:rangeOriginTickLabelTextSize="@dimen/range_tick_label_font_size"

However, when I make my plot the origin of the range axis text size is larger. Please help? I am doing no additional manipulation in the java. I would add an image but I do not have enough reputation.

Thanks

puzii
  • 117
  • 7

1 Answers1

0

This was due to a bug and has been fixed in versions 0.9.5 and later.

Nick
  • 8,181
  • 4
  • 38
  • 63
  • Thanks! That has sorted it. For now until another version comes up I have left it as this in the gradle script - 'com.androidplot:androidplot-core:0.9.+' – puzii Dec 15 '15 at 09:51
  • This may not be the best way to go about asking another question but in the XML file above I have also tried to get some check boxes to show - as per the examples on the demo app. However, the xml listed above does not show up on the screen. Any ideas why especially given I have no java related to the xml in the code? Does that make sense? – puzii Dec 15 '15 at 09:56
  • off the top of my head, it looks like you have the checkbox sibling to the plot view, while having the plot set to "fill_parent". i believe that would make it always take 100% of the screen, leaving no room for the checkbox. you should be able to solve the problem either by applying an appropriate layout_weight to both views, or by giving the plot a finite height and width. – Nick Dec 15 '15 at 15:24
  • Thanks again. Sorted that issue. Much appreciated. Now the even more complex part of plotting what I need! – puzii Dec 15 '15 at 15:41