使用Python熊猫创建非常规图表

时间:2018-10-31 02:39:38

标签: python pandas

我想在python熊猫中创建以下图表: enter image description here

Tables文件夹中的

Limits.txt确定每个delta_n限制的最小值和最大值。 DUTs.txt包含每个delta_n的值,

您可以在这里下载:

Tables.zip

请告知

1 个答案:

答案 0 :(得分:0)

startActivity(MainActivity.getIntent(this, uriToBundle(Objects.requireNonNull(imageToUploadUri)))); @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK) { if (requestCode == GALLERY_RESULT) { Uri imageUri = data.getData(); startActivity(MainActivity.getIntent(this, uriToBundle(Objects.requireNonNull(imageUri)))); } else if (requestCode == CAMERA_RESULT) { //Reducing Image Size File imageFile = new File(mCapturedImagePath); Bitmap image = BitmapFactory.decodeFile(mCapturedImagePath); image = Bitmap.createScaledBitmap(image, 300, 300, false); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); image.compress(Bitmap.CompressFormat.JPEG, 100, bytes); //This section is needed as you need to replace the image got from camera with reduced bitmap. //So that you just only need to carry URI not the bitmap. try { File file = new File(Environment.getExternalStorageDirectory() + File.separator + "filename.jpg"); boolean result; result = file.createNewFile(); if (result) { FileOutputStream fo = new FileOutputStream(imageFile); fo.write(bytes.toByteArray()); fo.close(); } } catch(IOException ie) { ie.printStackTrace(); } // Here's the main point. // You need to start MainActivity as bitmap has been processed. startActivity(MainActivity.getIntent(this, uriToBundle(Objects.requireNonNull(imageToUploadUri)))); } } else { Toast.makeText(this, "Image not loaded.", Toast.LENGTH_SHORT).show(); } } 是更好的选择。熊猫matplotlib只是bokeh-source

在bokeh中,您可以使用vbar

绘制条形图

您可以使用line

绘制线条

Bokeh入门指南:http://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blob/master/index.ipynb#Tutorial